git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7823555
)
bugfix: free without malloc in setLosslessBitsIndexed.
author
kramm
<kramm>
Mon, 7 Apr 2003 21:13:50 +0000
(21:13 +0000)
committer
kramm
<kramm>
Mon, 7 Apr 2003 21:13:50 +0000
(21:13 +0000)
lib/modules/swfbits.c
patch
|
blob
|
history
diff --git
a/lib/modules/swfbits.c
b/lib/modules/swfbits.c
index
a1110e3
..
c0c4bb8
100644
(file)
--- a/
lib/modules/swfbits.c
+++ b/
lib/modules/swfbits.c
@@
-338,7
+338,6
@@
int swf_SetLosslessBits(TAG * t,U16 width,U16 height,void * bitmap,U8 bitmap_fla
int swf_SetLosslessBitsIndexed(TAG * t,U16 width,U16 height,U8 * bitmap,RGBA * palette,U16 ncolors)
{ RGBA * pal = palette;
int bps = BYTES_PER_SCANLINE(width);
int swf_SetLosslessBitsIndexed(TAG * t,U16 width,U16 height,U8 * bitmap,RGBA * palette,U16 ncolors)
{ RGBA * pal = palette;
int bps = BYTES_PER_SCANLINE(width);
- U8 * data;
int res = 0;
if (!pal) // create default palette for grayscale images
int res = 0;
if (!pal) // create default palette for grayscale images
@@
-413,12
+412,9
@@
int swf_SetLosslessBitsIndexed(TAG * t,U16 width,U16 height,U8 * bitmap,RGBA * p
deflateEnd(&zs);
deflateEnd(&zs);
- if (zs.next_out>data) swf_SetBlock(t,data,zs.next_out-data);
-
free(zpal);
} else res = -2; // memory error
} else res = -3; // zlib error
free(zpal);
} else res = -2; // memory error
} else res = -3; // zlib error
- free(data);
}
if (!palette) free(pal);
}
if (!palette) free(pal);