summaryrefslogtreecommitdiff
path: root/graphics/exact-image/files/patch-codecs__xpm.cc
blob: e47fe83dbc91fd0bcd754d1dda73f5032ae12986 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- codecs/xpm.cc.orig	2009-07-02 18:34:51.000000000 -0400
+++ codecs/xpm.cc	2009-07-02 18:48:45.000000000 -0400
@@ -131,6 +131,7 @@
       // Type: c -> colour, m -> monochrome, g -> grayscale, and s -> symbolic
       if (type != "c") {
 	std::cerr << "XPM color type: " << type << " not yet implemented." << std::endl;
+	delete[] rmap; delete[] gmap; delete[] bmap;
 	return false;
       }
       
@@ -197,7 +198,7 @@
     }
   
   colorspace_de_palette (image, colors, rmap, gmap, bmap);
-  delete (rmap); delete (gmap); delete (bmap);
+  delete[] rmap; delete[] gmap; delete[] bmap;
   rmap = gmap = bmap = 0;
 
   return true;