opnsense-ports/graphics/exact-image/files/patch-codecs__xpm.cc
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

19 lines
634 B
C++

--- 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;