summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2016-07-10 20:18:44 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2016-07-10 20:24:08 +0200
commit686b520ff9ae25f9fa293a92e65b9331e192d142 (patch)
treebbf89378b8b78b578355213ea90823e2c7d21491
parent4069b716ad3422f2d7f595699220c39297427387 (diff)
downloademacs-686b520ff9ae25f9fa293a92e65b9331e192d142.tar.gz
Fix memory leak in imagemagick-types
* src/image.c (Fimagemagick_types): Use AcquireExceptionInfo to avoid memory leak.
-rw-r--r--src/image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/image.c b/src/image.c
index b07c1815eac..a85d5149e7e 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8885,13 +8885,13 @@ and `imagemagick-types-inhibit'. */)
{
Lisp_Object typelist = Qnil;
size_t numf = 0;
- ExceptionInfo ex;
+ ExceptionInfo *ex;
char **imtypes;
size_t i;
- GetExceptionInfo(&ex);
- imtypes = GetMagickList ("*", &numf, &ex);
- DestroyExceptionInfo(&ex);
+ ex = AcquireExceptionInfo ();
+ imtypes = GetMagickList ("*", &numf, ex);
+ DestroyExceptionInfo (ex);
for (i = 0; i < numf; i++)
{