Browse Source

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

pre-master-46
Holger Vogt 8 years ago
parent
commit
934656f6e8
  1. 3
      src/frontend/postcoms.c

3
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);

Loading…
Cancel
Save