diff options
| author | Lars Magne Ingebrigtsen | 2013-08-19 19:56:58 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2013-08-19 19:56:58 +0200 |
| commit | 453f40228f8ff3d43665f5bf008b117bf9b9a7dc (patch) | |
| tree | 764ec25423fb74ef0fe3bf545c692d6e06a2baa7 /src | |
| parent | 824a2fa7375eef76bc628a51f366a3dc3351d21e (diff) | |
| download | emacs-453f40228f8ff3d43665f5bf008b117bf9b9a7dc.tar.gz emacs-453f40228f8ff3d43665f5bf008b117bf9b9a7dc.zip | |
(imagemagick_get_animation_cache): Fix memory leak.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/image.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 716b1177fd1..2171f2b8748 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -2,6 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | * image.c (imagemagick_get_animation_cache): Don't segfault on | 3 | * image.c (imagemagick_get_animation_cache): Don't segfault on |
| 4 | each invocation. | 4 | each invocation. |
| 5 | (imagemagick_get_animation_cache): Revert to previous definition | ||
| 6 | so that it actually works. But keep the memory leak fix. | ||
| 7 | (imagemagick_get_animation_cache): Fix memory leak. | ||
| 5 | 8 | ||
| 6 | 2013-08-19 Paul Eggert <eggert@cs.ucla.edu> | 9 | 2013-08-19 Paul Eggert <eggert@cs.ucla.edu> |
| 7 | 10 | ||
diff --git a/src/image.c b/src/image.c index 2b415fb9b97..7a6323ad332 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7945,10 +7945,10 @@ imagemagick_get_animation_cache (MagickWand *wand) | |||
| 7945 | if (strcmp (signature, cache->signature)) | 7945 | if (strcmp (signature, cache->signature)) |
| 7946 | { | 7946 | { |
| 7947 | cache->next = imagemagick_create_cache (signature); | 7947 | cache->next = imagemagick_create_cache (signature); |
| 7948 | DestroyString (signature); | ||
| 7949 | return cache->next; | 7948 | return cache->next; |
| 7950 | } | 7949 | } |
| 7951 | 7950 | ||
| 7951 | DestroyString (signature); | ||
| 7952 | cache->update_time = current_emacs_time (); | 7952 | cache->update_time = current_emacs_time (); |
| 7953 | return cache; | 7953 | return cache; |
| 7954 | } | 7954 | } |