emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 686b520: Fix memory leak in imagemagick-types


From: Andreas Schwab
Subject: [Emacs-diffs] emacs-25 686b520: Fix memory leak in imagemagick-types
Date: Sun, 10 Jul 2016 18:25:22 +0000 (UTC)

branch: emacs-25
commit 686b520ff9ae25f9fa293a92e65b9331e192d142
Author: Andreas Schwab <address@hidden>
Commit: Andreas Schwab <address@hidden>

    Fix memory leak in imagemagick-types
    
    * src/image.c (Fimagemagick_types): Use AcquireExceptionInfo to
    avoid memory leak.
---
 src/image.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/image.c b/src/image.c
index b07c181..a85d514 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++)
     {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]