From f60992f5c7b4e3d63af326b63a8e87ab8ab8a92b Mon Sep 17 00:00:00 2001 From: Nick Lamb /GIMP Date: Fri, 21 Apr 2000 01:38:36 +0000 Subject: [PATCH] Revert Sven's changes --- ChangeLog | 6 ++++++ plug-ins/common/png.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0ad973a5ee..1d2181f291 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-04-20 Nick Lamb + + * plug-ins/common/png.c: Revert Sven's changes, I am not that + silly Sven, read the code more carefully and THINK about it. + We do not want to leak Gimp Images. + 2000-04-20 Sven Neumann * plug-ins/common/align_layers.c: applied patch provided by diff --git a/plug-ins/common/png.c b/plug-ins/common/png.c index b75cb85111..c511c5257e 100644 --- a/plug-ins/common/png.c +++ b/plug-ins/common/png.c @@ -398,9 +398,13 @@ load_image (gchar *filename) /* I - File to load */ if (setjmp (pp->jmpbuf)) { g_message (_("%s\nPNG error. File corrupted?"), filename); - return -1; + return image; } + /* initialise variables here, thus avoiding compiler warnings */ + + image= -1; + /* * Open the file and initialize the PNG read "engine"... */