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; }