diff options
| author | Alex Marshall <SquidMan72@gmail.com> | 2009-05-19 23:45:40 -0700 |
|---|---|---|
| committer | Alex Marshall <SquidMan72@gmail.com> | 2009-05-19 23:45:40 -0700 |
| commit | be9382acfb55df4aa407ce0f313ee8c0fbd1ccc1 (patch) | |
| tree | 7fe31357e5e04b1f8f35a385afe772edf42ac4cd /zetsubou/tpl.c | |
| parent | 7b7ef5bf8882efe5d92b33fb308bdbba3e7aa00f (diff) | |
Alright, THIS BETTER WORK >_<
Diffstat (limited to '')
| -rw-r--r-- | zetsubou/tpl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zetsubou/tpl.c b/zetsubou/tpl.c index c6106c7..eb9b12f 100644 --- a/zetsubou/tpl.c +++ b/zetsubou/tpl.c @@ -95,8 +95,6 @@ int TPL_ConvertRGBA8ToBitMap(u8* tplbuf, u32 tplsize, u32 tplpoint, u8** bitmapd u32 goodheight = height; u32 x, y; u32 x1, y1; - if(*bitmapdata != NULL) - free(*bitmapdata); *bitmapdata = (u8*)calloc(width * height, 4); if(*bitmapdata == NULL) return -1; @@ -820,6 +818,7 @@ int TPL_ConvertToGD(u8* tplbuf, u32 tplsize, char basename[], u32 format) fwrite(&h.max_lod, 1, 1, tplmeta); fwrite(&h.unpacked, 1, 1, tplmeta); fclose(tplmeta); + free(bitmapdata); } free(outname); return 0; @@ -1134,6 +1133,7 @@ int TPL_ConvertToBMP(u8* tplbuf, u32 tplsize, char basename[]) fwrite(&h.max_lod, 1, 1, out); fwrite(&h.unpacked, 1, 1, out); fclose(out); + free(subbitmapdata); } free(outname); return 0; |
