mirror of
https://github.com/troglobit/libite.git
synced 2026-10-01 13:32:42 +07:00
rsync(): Fix possible memory leak, found by Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+4
-2
@@ -110,8 +110,10 @@ int rsync(char *src, char *dst, int opt, int (*filter)(const char *file))
|
||||
struct stat sb;
|
||||
|
||||
strcat(source, "/");
|
||||
if (stat(source, &sb))
|
||||
return 1;
|
||||
if (stat(source, &sb)) {
|
||||
result++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mdir(dst2, sizeof(dst2), dst, files[i], &sb)) {
|
||||
result++;
|
||||
|
||||
Reference in New Issue
Block a user