From: Andreas Schwab Date: Sun, 10 Jul 2016 18:18:44 +0000 (+0200) Subject: Fix memory leak in imagemagick-types X-Git-Tag: emacs-25.1-rc1~31 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=686b520;p=emacs.git Fix memory leak in imagemagick-types * src/image.c (Fimagemagick_types): Use AcquireExceptionInfo to avoid memory leak. --- 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++) {