SDB: fix prevent issues 42/17642/1
authorho.namkoong <ho.namkoong@samsung.com>
Fri, 7 Mar 2014 07:55:28 +0000 (16:55 +0900)
committerho.namkoong <ho.namkoong@samsung.com>
Fri, 7 Mar 2014 07:55:28 +0000 (16:55 +0900)
critical issue: resource leak

Change-Id: I4c5e71de0d91f638ad922d725caf08abe60c88ac
Signed-off-by: ho.namkoong <ho.namkoong@samsung.com>
src/file_sync_functions.c

index b87981cad1304a5554bfd3ed338c44a24f8c68ac..58f3ca2e4c8d602b55a9d7feadd69df59ebb13e9 100644 (file)
@@ -581,6 +581,8 @@ int getdirlist_remote(int fd, char* src_dir, char* dst_dir, LIST_NODE** dirlist,
             print_error(0, ERR_SITU_SYNC_STAT_FILE, ERR_REASON_GENERAL_UNKNOWN, file_name);
             fprintf(stderr,"skipped: %s -> %s\n", src_full_path, dst_full_path);
             sync_info->skipped++;
+            free(src_full_path);
+            free(dst_full_path);
             continue;
         }
         st.st_size = ltohl(msg.dent.size);