fix coverity CID 349306 - resource leak

This commit is contained in:
iceman1001 2021-06-20 11:13:49 +02:00
commit 70709ca0ed

View file

@ -179,6 +179,9 @@ static int zlib_decompress(FILE *infile, FILE *outfiles[], uint8_t num_outfiles,
fclose(outfiles[j]);
}
}
if (outbufall) {
free(outbufall);
}
free(inbuf);
return (EXIT_FAILURE);
}
@ -247,6 +250,9 @@ static int zlib_decompress(FILE *infile, FILE *outfiles[], uint8_t num_outfiles,
fclose(outfiles[j]);
}
}
if (outbufall) {
free(outbufall);
}
return (EXIT_SUCCESS);
}