diff options
| author | 2018-07-24 14:17:40 +0200 | |
|---|---|---|
| committer | 2018-07-24 14:36:27 +0200 | |
| commit | c7ead85cb9daabe26df467b16ddefbbc7b1d3f3c (patch) | |
| tree | 2e8a984dcb8e677e68fa233d9dc283a530fcdaff /tools | |
| parent | 26373b334889f5ae2e2737ff447eb25b1700fa2f (diff) | |
| download | libimobiledevice-c7ead85cb9daabe26df467b16ddefbbc7b1d3f3c.tar.gz libimobiledevice-c7ead85cb9daabe26df467b16ddefbbc7b1d3f3c.tar.bz2 | |
idevicebackup2: Fix fd leak in mb2_copy_file_by_path()
fd was leak in error path.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/idevicebackup2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index e6c1d3f..010e51d 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c | |||
| @@ -1150,6 +1150,7 @@ static void mb2_copy_file_by_path(const char *src, const char *dst) | |||
| 1150 | /* open destination file */ | 1150 | /* open destination file */ |
| 1151 | if ((to = fopen(dst, "wb")) == NULL) { | 1151 | if ((to = fopen(dst, "wb")) == NULL) { |
| 1152 | printf("Cannot open destination file '%s'.\n", dst); | 1152 | printf("Cannot open destination file '%s'.\n", dst); |
| 1153 | fclose(from); | ||
| 1153 | return; | 1154 | return; |
| 1154 | } | 1155 | } |
| 1155 | 1156 | ||
