mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-01 09:51:22 -08:00
(imagemagick_get_animation_cache): Fix a double-free error.
This commit is contained in:
parent
274ff63f7f
commit
8a6f875f7e
2 changed files with 9 additions and 7 deletions
|
|
@ -1,6 +1,7 @@
|
|||
2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
|
||||
|
||||
* image.c: Implement an ImageMagick per-image cache.
|
||||
(imagemagick_get_animation_cache): Fix a double-free error.
|
||||
|
||||
2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
|
||||
|
||||
|
|
|
|||
15
src/image.c
15
src/image.c
|
|
@ -7901,9 +7901,9 @@ void
|
|||
imagemagick_prune_animation_cache ()
|
||||
{
|
||||
struct animation_cache *cache = animation_cache;
|
||||
struct animation_cache *prev;
|
||||
struct animation_cache *prev = NULL;
|
||||
EMACS_TIME old = sub_emacs_time (current_emacs_time (),
|
||||
EMACS_TIME_FROM_DOUBLE (60));
|
||||
EMACS_TIME_FROM_DOUBLE (5));
|
||||
|
||||
while (cache)
|
||||
{
|
||||
|
|
@ -7920,17 +7920,18 @@ imagemagick_prune_animation_cache ()
|
|||
cache = cache->next;
|
||||
free (this_cache);
|
||||
}
|
||||
else {
|
||||
prev = cache;
|
||||
cache = cache->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
prev = cache;
|
||||
cache = cache->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct animation_cache *
|
||||
imagemagick_get_animation_cache (MagickWand *wand)
|
||||
{
|
||||
char *signature = MagickGetImageSignature (wand);
|
||||
char *signature = xstrdup (MagickGetImageSignature (wand));
|
||||
struct animation_cache *cache = animation_cache;
|
||||
|
||||
imagemagick_prune_animation_cache ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue