From 0c503429e0248b2cd5f70a60e4aab85b47235a46 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Tue, 20 Aug 2013 19:47:10 +0200 Subject: [PATCH] breakp2.c: plug some tiny memory leaks --- src/frontend/breakp2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/frontend/breakp2.c b/src/frontend/breakp2.c index c72af2d30..61b043cdc 100644 --- a/src/frontend/breakp2.c +++ b/src/frontend/breakp2.c @@ -148,12 +148,12 @@ copynode(char *s) if (strstr(s, "(")) s = stripWhiteSpacesInsideParens(s); + else + s = copy(s); l = strrchr(s, '('/*)*/); - if (!l) { - ret = copy(s); - return ret; - } + if (!l) + return s; r = strchr(s, /*(*/')'); *r = '\0'; @@ -164,5 +164,6 @@ copynode(char *s) } else ret = copy(l + 1); + tfree(s); return ret; }