From 18c527db8b3561988b427c1c19b8875c524342d0 Mon Sep 17 00:00:00 2001 From: "pnunn%netscape.com" Date: Mon, 27 Mar 2000 22:04:57 +0000 Subject: [PATCH] bug#32320: r:neeti, fix memleak of png structs. tested on linux,NT bug#33452: r:troy, fix so frame_complete notifications only occur on animated images. on single frame images, only give image_complete notifications. tested on linux, NT. pnunn git-svn-id: svn://10.0.0.236/trunk@64240 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/libimg/pngcom/ipng.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mozilla/modules/libimg/pngcom/ipng.cpp b/mozilla/modules/libimg/pngcom/ipng.cpp index 7b93e4d9f64..f94a17a8556 100644 --- a/mozilla/modules/libimg/pngcom/ipng.cpp +++ b/mozilla/modules/libimg/pngcom/ipng.cpp @@ -155,8 +155,7 @@ il_png_complete(il_container *ic) /* notify observers that the current frame has completed. */ -/* ic->imgdcb->ImgDCBHaveImageAll(); GRR: what about this? (from jpeg.cpp) */ - ic->imgdcb->ImgDCBHaveImageFrame(); + ic->imgdcb->ImgDCBHaveImageAll(); #ifndef WE_DONT_HAVE_SUBSEQUENT_IMAGES /* An image can specify a delay time before which to display @@ -192,6 +191,8 @@ il_png_abort(il_container *ic) ipng_p->alpharow = NULL; #ifdef WE_DONT_HAVE_SUBSEQUENT_IMAGES + + png_destroy_read_struct(&ipng_p->pngs_p, &ipng_p->info_p, NULL); PR_FREEIF(ipng_p); ic->ds = NULL; #endif