Fix some double frees.

This commit is contained in:
Bill Currie 2018-09-07 20:03:19 +09:00
parent 8fd5be0ee0
commit 8f028b8a0d
2 changed files with 2 additions and 1 deletions

View file

@ -166,6 +166,7 @@ bi_File_Open (progs_t *pr)
if ((R_INT (pr) = QFile_AllocHandle (pr, file))) if ((R_INT (pr) = QFile_AllocHandle (pr, file)))
return; return;
Qclose (file); Qclose (file);
return;
error: error:
free (path); free (path);
R_INT (pr) = 0; R_INT (pr) = 0;

View file

@ -607,7 +607,7 @@ qfo_delete (qfo_t *qfo)
} else { } else {
int i; int i;
for (i = 0; i < qfo->num_spaces; i++) for (i = 0; i < qfo->num_spaces; i++)
free (qfo->spaces->d.data); free (qfo->spaces[i].d.data);
free (qfo->relocs); free (qfo->relocs);
free (qfo->defs); free (qfo->defs);
free (qfo->funcs); free (qfo->funcs);