/* initial shift register value */
crc = 0xffffffffL;
- crc_table = (unsigned long *) malloc(256 * sizeof(unsigned long));
+ crc_table = (unsigned long *) xmalloc(256 * sizeof(unsigned long));
/* Make exclusive-or pattern from polynomial (0xedb88320) */
for (i = 0; i < sizeof(p)/sizeof(int); i++)
}
/* decompress until an end-of-block code */
- if (inflate_codes(tl, td, bl, bd))
+ if (inflate_codes(tl, td, bl, bd)) {
+ huft_free(tl);
+ huft_free(td);
return 1;
+ }
/* free the decoding tables, return */
huft_free(tl);
}
/* decompress until an end-of-block code */
- if (inflate_codes(tl, td, bl, bd))
+ if (inflate_codes(tl, td, bl, bd)) {
+ huft_free(tl);
+ huft_free(td);
return 1;
+ }
/* free the decoding tables, return */
huft_free(tl);