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