fix memory leak: before killing a plot, remove its hash table entry

This commit is contained in:
Holger Vogt 2018-08-07 20:42:55 +02:00
parent 6c682180ab
commit 934656f6e8
1 changed files with 3 additions and 0 deletions

View File

@ -863,6 +863,9 @@ killplot(struct plot *pl)
if (pl == plot_cur)
plot_cur = op;
}
/* delete the hash table entry for this plot */
if (pl->pl_lookup_table)
nghash_free(pl->pl_lookup_table, NULL, NULL);
tfree(pl->pl_title);
tfree(pl->pl_name);
tfree(pl->pl_typename);