summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/idevicebackup2.c1
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)
/* open destination file */
if ((to = fopen(dst, "wb")) == NULL) {
printf("Cannot open destination file '%s'.\n", dst);
+ fclose(from);
return;
}