From 3f3936c72899886d569f28a2c260155c3df21b33 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 1 Nov 2021 14:01:31 +0100 Subject: [PATCH] Remove memory leaks --- src/frontend/inpcom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index dec928608..b6f19a812 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -8775,6 +8775,7 @@ static struct card *pspice_compat(struct card *oldcard) else { begstr = copy_substring(lstr, partstr); newstr = tprintf("%s r_on%s", begstr, partstr + 3); + tfree(begstr); } tfree(lstr); lstr = newstr; @@ -8786,6 +8787,7 @@ static struct card *pspice_compat(struct card *oldcard) else { begstr = copy_substring(lstr, partstr); newstr = tprintf("%s r_off%s", begstr, partstr + 4); + tfree(begstr); } tfree(lstr); lstr = newstr; @@ -8799,6 +8801,7 @@ static struct card *pspice_compat(struct card *oldcard) else { begstr = copy_substring(lstr, partstr); newstr = tprintf("%s cntl_on%s", begstr, partstr + 3); + tfree(begstr); } tfree(lstr); lstr = newstr; @@ -8812,6 +8815,7 @@ static struct card *pspice_compat(struct card *oldcard) else { begstr = copy_substring(lstr, partstr); newstr = tprintf("%s cntl_off%s", begstr, partstr + 4); + tfree(begstr); } tfree(lstr); lstr = newstr;