mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
ookii itai... forgot to free the malloced memory for qpic and mip
This commit is contained in:
parent
f2d7d97319
commit
3e16e3dc40
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue