From 73bb34fcdc5aa1026c5778fd4f6bb5e7624d0aa6 Mon Sep 17 00:00:00 2001 From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org> Date: Fri, 17 Apr 1998 01:34:15 +0200 Subject: [PATCH] memory leak fix Rev: src/modules/Image/encodings/gif.c:1.40 --- src/modules/Image/encodings/gif.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/Image/encodings/gif.c b/src/modules/Image/encodings/gif.c index 572e20a57d..1125e80284 100644 --- a/src/modules/Image/encodings/gif.c +++ b/src/modules/Image/encodings/gif.c @@ -1,9 +1,9 @@ -/* $Id: gif.c,v 1.39 1998/04/16 22:54:03 mirar Exp $ */ +/* $Id: gif.c,v 1.40 1998/04/16 23:34:15 mirar Exp $ */ /* **! module Image **! note -**! $Id: gif.c,v 1.39 1998/04/16 22:54:03 mirar Exp $ +**! $Id: gif.c,v 1.40 1998/04/16 23:34:15 mirar Exp $ **! submodule GIF **! **! This submodule keep the GIF encode/decode capabilities @@ -31,7 +31,7 @@ #include <ctype.h> #include "stralloc.h" -RCSID("$Id: gif.c,v 1.39 1998/04/16 22:54:03 mirar Exp $"); +RCSID("$Id: gif.c,v 1.40 1998/04/16 23:34:15 mirar Exp $"); #include "pike_macros.h" #include "object.h" #include "constants.h" @@ -1809,13 +1809,11 @@ static void image_gif__decode(INT32 args) error("Image.GIF._decode: internal error: " "illegal result from __decode\n"); - (a=sp[-1].u.array)->refs++; + a=sp[-1].u.array; if (a->size<5) error("Image.GIF._decode: given (__decode'd) array " "is too small\n"); - pop_n_elems(1); - push_svalue(a->item+0); /* xsize */ push_svalue(a->item+1); /* ysize */ @@ -1978,6 +1976,8 @@ static void image_gif__decode(INT32 args) } f_aggregate(n); + stack_swap(); + pop_stack(); } /* -- GitLab