during removing the plot 'const', also delete the hash table

This commit is contained in:
Holger Vogt 2020-05-21 20:04:45 +02:00
parent f83bbb0d0f
commit 0cf6b89eb3
1 changed files with 5 additions and 1 deletions

View File

@ -954,7 +954,7 @@ static void killplot(struct plot *pl)
txfree(pl); /* va: also tfree pl itself (memory leak) */
}
/* delete the const plot (called from com_quit) */
void
destroy_const_plot(void)
{
@ -966,6 +966,10 @@ destroy_const_plot(void)
nv = v->v_next;
vec_free(v);
}
/* delete the hash table entry for the const plot */
if (pl->pl_lookup_table) {
nghash_free(pl->pl_lookup_table, NULL, NULL);
}
wl_free(pl->pl_commands);
if (pl->pl_ccom) /* va: also tfree (memory leak) */
throwaway(pl->pl_ccom);