fix memory leak: before killing a plot, remove its hash table entry
This commit is contained in:
parent
6c682180ab
commit
934656f6e8
|
|
@ -863,6 +863,9 @@ killplot(struct plot *pl)
|
||||||
if (pl == plot_cur)
|
if (pl == plot_cur)
|
||||||
plot_cur = op;
|
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_title);
|
||||||
tfree(pl->pl_name);
|
tfree(pl->pl_name);
|
||||||
tfree(pl->pl_typename);
|
tfree(pl->pl_typename);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue