Lines 1-6
Link Here
|
1 |
--- codecs/bmp.cc.orig 2009-07-02 17:37:58.000000000 -0400 |
1 |
--- codecs/bmp.cc.orig 2009-04-27 13:54:29.000000000 -0400 |
2 |
+++ codecs/bmp.cc 2009-07-02 18:38:49.000000000 -0400 |
2 |
+++ codecs/bmp.cc 2010-01-17 00:32:01.000000000 -0500 |
3 |
@@ -628,9 +628,9 @@ |
3 |
@@ -441,6 +441,8 @@ |
|
|
4 |
uint8_t* row_data = (uint8_t*) malloc (file_stride); |
5 |
if (!data || !row_data) { |
6 |
std::cerr << "Can't allocate space for image buffer\n"; |
7 |
+ free(data); |
8 |
+ free(row_data); |
9 |
goto bad1; |
10 |
} |
11 |
|
12 |
@@ -522,6 +524,7 @@ |
13 |
comprbuf = (uint8_t *) malloc( compr_size ); |
14 |
if (!comprbuf) { |
15 |
std::cerr << "Can't allocate space for compressed scanline buffer\n"; |
16 |
+ free(comprbuf); |
17 |
goto bad1; |
18 |
} |
19 |
uncomprbuf = (uint8_t *) malloc( uncompr_size ); |
20 |
@@ -593,6 +596,7 @@ |
21 |
data = (uint8_t *) malloc( uncompr_size ); |
22 |
if (!data) { |
23 |
std::cerr << "Can't allocate space for final uncompressed scanline buffer\n"; |
24 |
+ free(data); |
25 |
goto bad1; |
26 |
} |
27 |
|
28 |
@@ -628,9 +632,9 @@ |
4 |
|
29 |
|
5 |
colorspace_de_palette (image, clr_tbl_size, rmap, gmap, bmap); |
30 |
colorspace_de_palette (image, clr_tbl_size, rmap, gmap, bmap); |
6 |
|
31 |
|