dbgutil: fix double-free on error in jpeg_finish_decompress.
This commit is contained in:
parent
5174ba77f8
commit
ffc2f9b68a
1 changed files with 2 additions and 2 deletions
|
@ -86,7 +86,7 @@ static void my_output_message(struct jpeg_common_struct *com)
|
|||
char buf[JMSG_LENGTH_MAX];
|
||||
|
||||
err->base.format_message(com, buf);
|
||||
fprintf(stderr, "JPEG error: %s", buf);
|
||||
fprintf(stderr, "JPEG error: %s\n", buf);
|
||||
}
|
||||
|
||||
static void my_error_exit(struct jpeg_common_struct *com)
|
||||
|
@ -151,8 +151,8 @@ int load_jpeg(struct quirc *q, const char *filename)
|
|||
jpeg_read_scanlines(&dinfo, &row_pointer, 1);
|
||||
}
|
||||
|
||||
fclose(infile);
|
||||
jpeg_finish_decompress(&dinfo);
|
||||
fclose(infile);
|
||||
jpeg_destroy_decompress(&dinfo);
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue