Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8a6f875f
Commit
8a6f875f
authored
Aug 16, 2013
by
Lars Magne Ingebrigtsen
Browse files
(imagemagick_get_animation_cache): Fix a double-free error.
parent
274ff63f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
src/ChangeLog
src/ChangeLog
+1
-0
src/image.c
src/image.c
+8
-7
No files found.
src/ChangeLog
View file @
8a6f875f
2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
* image.c: Implement an ImageMagick per-image cache.
* 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>
2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
...
...
src/image.c
View file @
8a6f875f
...
@@ -7901,9 +7901,9 @@ void
...
@@ -7901,9 +7901,9 @@ void
imagemagick_prune_animation_cache ()
imagemagick_prune_animation_cache ()
{
{
struct animation_cache *cache = 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 old = sub_emacs_time (current_emacs_time (),
EMACS_TIME_FROM_DOUBLE (
60
));
EMACS_TIME_FROM_DOUBLE (
5
));
while (cache)
while (cache)
{
{
...
@@ -7920,17 +7920,18 @@ imagemagick_prune_animation_cache ()
...
@@ -7920,17 +7920,18 @@ imagemagick_prune_animation_cache ()
cache = cache->next;
cache = cache->next;
free (this_cache);
free (this_cache);
}
}
else {
else
prev = cache;
{
cache = cache->next;
prev = cache;
}
cache = cache->next;
}
}
}
}
}
struct animation_cache *
struct animation_cache *
imagemagick_get_animation_cache (MagickWand *wand)
imagemagick_get_animation_cache (MagickWand *wand)
{
{
char *signature = MagickGetImageSignature (wand);
char *signature =
xstrdup (
MagickGetImageSignature (wand)
)
;
struct animation_cache *cache = animation_cache;
struct animation_cache *cache = animation_cache;
imagemagick_prune_animation_cache ();
imagemagick_prune_animation_cache ();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment