ookii itai... forgot to free the malloced memory for qpic and mip

This commit is contained in:
Bill Currie 2004-05-11 06:17:34 +00:00
parent f2d7d97319
commit 3e16e3dc40

View file

@ -281,6 +281,7 @@ wad_extract (wad_t *wad, lumpinfo_t *pf)
Qread (wad->handle, qpic, pf->size);
pcx = EncodePCX (qpic->data, qpic->width, qpic->height,
qpic->width, default_palette, false, &len);
free (qpic);
if (Qwrite (file, pcx, len) != len) {
fprintf (stderr, "Error writing to %s\n", name.str);
return -1;
@ -293,6 +294,7 @@ wad_extract (wad_t *wad, lumpinfo_t *pf)
pcx = EncodePCX ((byte *) mip + mip->offsets[0],
mip->width, mip->height, mip->width,
default_palette, false, &len);
free (mip);
if (Qwrite (file, pcx, len) != len) {
fprintf (stderr, "Error writing to %s\n", name.str);
return -1;