From b62584cbcd7dbbb740b9420e37f34ee1b2e8ff18 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Wed, 10 Sep 2008 19:02:11 +0000 Subject: 25639: free ptr2 if hsubl is NULL. --- Src/hist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/hist.c b/Src/hist.c index 521baf613..f3979dfc0 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -346,8 +346,10 @@ getsubsargs(char *subline, int *gbalp, int *cflagp) if (strlen(ptr1)) { zsfree(hsubl); hsubl = ptr1; - } else if (!hsubl) /* fail silently on this */ + } else if (!hsubl) { /* fail silently on this */ + zsfree(ptr2); return 0; + } zsfree(hsubr); hsubr = ptr2; follow = ingetc(); -- cgit 1.4.1