Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx> --- lib/gui/picopng.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/gui/picopng.c b/lib/gui/picopng.c index 77cd81c..e740b1c 100644 --- a/lib/gui/picopng.c +++ b/lib/gui/picopng.c @@ -761,9 +761,12 @@ int main(int argc, char **argv) infp = fopen(fname, "rb"); if (!infp) { perror("fopen"); + free(inbuf); return 1; } else if (fread(inbuf, 1, insize, infp) != insize) { perror("fread"); + free(inbuf); + fclose(infp); return 1; } fclose(infp); @@ -793,6 +796,7 @@ int main(int argc, char **argv) return 1; } else if (fwrite(info->image->data, 1, outsize, outfp) != outsize) { perror("fwrite"); + fclose(outfp); return 1; } fclose(outfp); -- 1.8.3.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox