diff options
author | Simon Bünzli <zeniko@gmail.com> | 2014-01-15 00:00:44 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2014-01-16 15:54:19 +0000 |
commit | 63b1948b4d03f401f5de1c5bd06721bd627ab024 (patch) | |
tree | 87aa26345138010e368785c7227b9ad3fbf70a95 /source/tools/pdfextract.c | |
parent | 9407e83ff388997fe621232a6190f950bcc263ff (diff) | |
download | mupdf-63b1948b4d03f401f5de1c5bd06721bd627ab024.tar.xz |
fix memory leaks in pdf_load_jpx and fz_new_image_from_pixmap
fz_new_image_from_pixmap expects that the pixmap's colorspace has two
references which is contrary to expectations. If it instead addrefs the
pixmap's colorspace, the only caller pdf_load_jpx can consistently
drop the colorspace after passing it to fz_load_jpx.
Also, if the contract is that whatever is passed into
fz_new_image_from_pixmap belongs to the new image, then the pixmap also
has to be dropped on error so that it isn't leaked.
Diffstat (limited to 'source/tools/pdfextract.c')
0 files changed, 0 insertions, 0 deletions