GNU bug report logs - #66221
29.1; Animated webp image leaks memory

Previous Next

Package: emacs;

Reported by: johanwclaesson <at> gmail.com

Date: Tue, 26 Sep 2023 23:20:02 UTC

Severity: normal

Found in version 29.1

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Garjola Dindi <garjola <at> garjola.net>
Cc: johanwclaesson <at> bahnhof.se, johanwclaesson <at> gmail.com, larsi <at> gnus.org, 66221 <at> debbugs.gnu.org
Subject: bug#66221: 29.1; Animated webp image leaks memory
Date: Fri, 29 Sep 2023 08:42:34 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

> Feel free to step through clear-image-cache and see what happens
> there.

I noticed that `clear-image-cache' won't clear the rest of the image
cache if we have a non-empty animation_cache.  Is that expected?

IOW, would a change like the following make more sense?

diff --git a/src/image.c b/src/image.c
index 84db9bfb3b8..e98768e70bd 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2345,7 +2345,6 @@ DEFUN ("clear-image-cache", Fclear_image_cache,
Sclear_image_cache,
 #if defined (HAVE_WEBP) || defined (HAVE_GIF)
       anim_prune_animation_cache (XCDR (animation_cache));
 #endif
-      return Qnil;
     }

   if (! (NILP (filter) || FRAMEP (filter)))




This bug report was last modified 1 year and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.