Blame netpbm-10.27-bmptopnm.patch
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
001711f |
--- netpbm-10.32/converter/other/bmptopnm.c.bmptopnm 2006-02-27 15:02:02.000000000 +0100
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
001711f |
+++ netpbm-10.32/converter/other/bmptopnm.c 2006-02-27 15:07:31.000000000 +0100
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
001711f |
@@ -1248,7 +1248,7 @@ readBmp(FILE * const ifP,
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
xel ** const colormapP,
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
bool const verbose) {
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
- xel * colormap; /* malloc'ed */
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
+ xel * colormap = NULL; /* malloc'ed */
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
unsigned int pos;
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
001711f |
/* Current byte position in the BMP file */
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
001711f |
@@ -1455,7 +1455,7 @@ main(int argc, char ** argv) {
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
001711f |
writeRasterGen(BMPraster, cols, rows, outputType, cBitCount,
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
001711f |
pixelformat, colormap);
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
001711f |
}
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
- free(colormap);
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
+ if (colormap) free(colormap);
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
free(BMPraster);
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
751dd22 |
|
|
![](https://seccdn.libravatar.org/avatar/9567c565725defb09e8ebcb659652d98fe8255445711ee66167dff84e71984a8?s=16&d=retro) |
001711f |
return 0;
|