From b2e377031ae0542790d2a128a064a04ccac536f8 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 24 Feb 2020 23:01:05 +0100 Subject: [PATCH] plug some memory leaks --- src/frontend/plotting/plotit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/frontend/plotting/plotit.c b/src/frontend/plotting/plotit.c index 6e91694fd..6951e3730 100644 --- a/src/frontend/plotting/plotit.c +++ b/src/frontend/plotting/plotit.c @@ -344,7 +344,7 @@ bool plotit(wordlist *wl, const char *hcopy, const char *devname) } if (nylabel) { rc_ds |= ds_cat_printf(&ds_cline, " ylabel '%s'", nylabel); - tfree(nxlabel); + tfree(nylabel); } if (ntitle) { rc_ds |= ds_cat_printf(&ds_cline, " title '%s'", ntitle); @@ -1136,6 +1136,8 @@ quit: ds_free(&ds_cline); /* free dstring resources, if any */ free_pnode(names); FREE(title); + FREE(xlabel); + FREE(ylabel); quit1: /* Free any vectors left behing while parsing the plot arguments. These