diff options
author | Elliott Hughes <enh@google.com> | 2013-10-29 21:26:55 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-10-29 21:26:55 +0000 |
commit | 36d44740dd045403ae615b8dd6dac8b9a4e9f5bf (patch) | |
tree | f4d986698864a59ea87af253247753768916be37 /adb | |
parent | 98f87d92d89079f274374409efcf57ca52b13c1f (diff) | |
parent | 14e28d39f7f094225c1ddae8fa43bd792c621a8f (diff) | |
download | system_core-36d44740dd045403ae615b8dd6dac8b9a4e9f5bf.zip system_core-36d44740dd045403ae615b8dd6dac8b9a4e9f5bf.tar.gz system_core-36d44740dd045403ae615b8dd6dac8b9a4e9f5bf.tar.bz2 |
Merge "Fix a bunch of small system/core bugs."
Diffstat (limited to 'adb')
-rw-r--r-- | adb/file_sync_client.c | 2 | ||||
-rw-r--r-- | adb/file_sync_service.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/adb/file_sync_client.c b/adb/file_sync_client.c index 354d0fb..9fec081 100644 --- a/adb/file_sync_client.c +++ b/adb/file_sync_client.c @@ -642,8 +642,8 @@ static int local_build_list(copyinfo **filelist, ci = mkcopyinfo(lpath, rpath, name, 0); if(lstat(ci->src, &st)) { fprintf(stderr,"cannot stat '%s': %s\n", ci->src, strerror(errno)); + free(ci); closedir(d); - return -1; } if(!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode)) { diff --git a/adb/file_sync_service.c b/adb/file_sync_service.c index d3e841b..f24f14c 100644 --- a/adb/file_sync_service.c +++ b/adb/file_sync_service.c @@ -110,6 +110,7 @@ static int do_list(int s, const char *path) if(writex(s, &msg.dent, sizeof(msg.dent)) || writex(s, de->d_name, len)) { + closedir(d); return -1; } } |