Fix some bugs found while hacking inputlines.

This commit is contained in:
Bill Currie 2011-07-09 09:42:11 +09:00
parent c30e2956f2
commit 3dd31b7de9
3 changed files with 7 additions and 0 deletions

View file

@ -198,6 +198,8 @@ bi_Hash_DelTable (progs_t *pr)
Hash_DelTable (ht->tab);
*ht->prev = ht->next;
if (ht->next)
ht->next->prev = ht->prev;
table_free (res, ht);
}

View file

@ -101,6 +101,7 @@ bi_plist_clear (progs_t *pr, void *data)
if (plist->own)
PL_Free (plist->plitem);
}
res->plists = 0;
Hash_FlushTable (res->plist_tab);
plist_reset (res);
@ -137,6 +138,8 @@ plist_free_handle (plist_resources_t *res, bi_plist_t *plist)
{
Hash_DelElement (res->plist_tab, plist);
*plist->prev = plist->next;
if (plist->next)
plist->next->prev = plist->prev;
plist_free (res, plist);
}

View file

@ -193,6 +193,8 @@ bi_Qclose (progs_t *pr)
PR_RunError (pr, "invalid file handle passed to Qclose");
Qclose (h->file);
*h->prev = h->next;
if (h->next)
h->next->prev = h->prev;
handle_free (res, h);
}