Fix possible resource leak
authorColin Leroy <colin@colino.net>
Fri, 28 Sep 2018 14:55:24 +0000 (16:55 +0200)
committerColin Leroy <colin@colino.net>
Fri, 28 Sep 2018 14:55:24 +0000 (16:55 +0200)
src/common/utils.c

index 33eb31d..51813e1 100644 (file)
@@ -2630,7 +2630,7 @@ gint copy_file_part(FILE *fp, off_t offset, size_t length, const gchar *dest)
        if (copy_file_part_to_fp(fp, offset, length, dest_fp) < 0)
                err = TRUE;
 
-       if (!err && fclose(dest_fp) == EOF) {
+       if (fclose(dest_fp) == EOF) {
                FILE_OP_ERROR(dest, "fclose");
                err = TRUE;
        }