Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH 14/17: getsubsargs: free ptr1 before returning



Found by Coverity (Issue 439073).
---
 Src/hist.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Src/hist.c b/Src/hist.c
index d8192c1..e65d78b 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -367,6 +367,7 @@ getsubsargs(char *subline, int *gbalp, int *cflagp)
 	zsfree(hsubl);
 	hsubl = ptr1;
     } else if (!hsubl) {		/* fail silently on this */
+	zsfree(ptr1);
 	zsfree(ptr2);
 	return 0;
     }
-- 
2.2.0.GIT



Messages sorted by: Reverse Date, Date, Thread, Author