Browse Source

Set pl_lookup_table to NULL after freeing: allow another initialization

pre-master-46
Holger Vogt 2 years ago
parent
commit
250e9afd92
  1. 2
      src/frontend/postcoms.c

2
src/frontend/postcoms.c

@ -965,6 +965,7 @@ static void killplot(struct plot *pl)
/* delete the hash table entry for this plot */
if (pl->pl_lookup_table) {
nghash_free(pl->pl_lookup_table, NULL, NULL);
pl->pl_lookup_table = NULL;
}
txfree(pl->pl_title);
txfree(pl->pl_name);
@ -998,6 +999,7 @@ destroy_const_plot(void)
/* delete the hash table entry for the const plot */
if (pl->pl_lookup_table) {
nghash_free(pl->pl_lookup_table, NULL, NULL);
pl->pl_lookup_table = NULL;
}
wl_free(pl->pl_commands);
if (pl->pl_ccom) /* va: also tfree (memory leak) */

Loading…
Cancel
Save