From 0cf6b89eb32b39b8d8b3baf629bd746316c80d39 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Thu, 21 May 2020 20:04:45 +0200 Subject: [PATCH] during removing the plot 'const', also delete the hash table --- src/frontend/postcoms.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/frontend/postcoms.c b/src/frontend/postcoms.c index 830aaf54e..80a44fa16 100644 --- a/src/frontend/postcoms.c +++ b/src/frontend/postcoms.c @@ -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);