[gdk-pixbuf/wip/rishi/png: 1/2] 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/2] io-png: Don't leak the png_infop in begin_load
- Date: Wed, 12 Sep 2018 11:55:27 +0000 (UTC)
commit af8807594b2ebbf3d19bcbe822bfab9db4ff3e32
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
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]