[gdk-pixbuf/wip/rishi/png: 1/3] io-png: Don't leak the png_infop in begin_load
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf/wip/rishi/png: 1/3] io-png: Don't leak the png_infop in begin_load
- Date: Wed, 12 Sep 2018 11:56:05 +0000 (UTC)
commit 38060f9368c6aef74001d31f9d53a870ca6c80a9
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Sep 8 15:32:54 2018 +0200
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
gdk-pixbuf/io-png.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]