diff options
author | Debarshi Ray <debarshir@gnome.org> | 2018-09-08 15:32:54 +0200 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2018-09-10 07:14:47 +0200 |
commit | 38060f9368c6aef74001d31f9d53a870ca6c80a9 (patch) | |
tree | db6d2383793fba80627d0e793b0788e5eb82705b /gdk-pixbuf/io-png.c | |
parent | 36939ecb02a8855b0ee1ae183fc284389ee54a9d (diff) | |
download | gdk-pixbuf-38060f9368c6aef74001d31f9d53a870ca6c80a9.tar.gz |
io-png: Don't leak the png_infop in begin_load
If lc->png_info_ptr is not NULL, then not passing it to
png_destroy_read_struct will not release some resources.
Fallout from e8d0d8ed3d33ee6cedb75a394c36af3312b310ff
https://gitlab.gnome.org/GNOME/gdk-pixbuf/merge_requests/16
Diffstat (limited to 'gdk-pixbuf/io-png.c')
-rw-r--r-- | gdk-pixbuf/io-png.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c index c1e215064..b7f27e24a 100644 --- a/gdk-pixbuf/io-png.c +++ b/gdk-pixbuf/io-png.c @@ -489,7 +489,7 @@ gdk_pixbuf__png_image_begin_load (GdkPixbufModuleSizeFunc size_func, if (setjmp (png_jmpbuf(lc->png_read_ptr))) { if (lc->png_info_ptr) - png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL); + png_destroy_read_struct(&lc->png_read_ptr, &lc->png_info_ptr, NULL); g_free(lc); /* error callback should have set the error */ return NULL; |