From 934656f6e8681de4ac6385018260e62313106884 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 7 Aug 2018 20:42:55 +0200 Subject: [PATCH] fix memory leak: before killing a plot, remove its hash table entry --- src/frontend/postcoms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontend/postcoms.c b/src/frontend/postcoms.c index d24c2ca28..83fc5cdf3 100644 --- a/src/frontend/postcoms.c +++ b/src/frontend/postcoms.c @@ -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);