don't leak an XBM-image-sized buffer
authorJim Meyering <meyering@redhat.com>
Wed, 22 Jun 2011 12:23:17 +0000 (14:23 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 22 Jun 2011 12:23:17 +0000 (14:23 +0200)
* image.c (xbm_load): Free the image buffer after using it.

src/ChangeLog
src/image.c

index 48625bb..571979e 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-22  Jim Meyering  <meyering@redhat.com>
+
+       don't leak an XBM-image-sized buffer
+       * image.c (xbm_load): Free the image buffer after using it.
+
 2011-06-21  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port to Sun C.
index 495bfdc..8025681 100644 (file)
@@ -2829,6 +2829,7 @@ xbm_load (struct frame *f, struct image *img)
        }
 
       success_p = xbm_load_image (f, img, contents, contents + size);
+      xfree (contents);
     }
   else
     {