[pacman-dev] [PATCH] pacman/util.c: fix potential memory leak in indentprint

Allan McRae allan at archlinux.org
Sun Dec 21 14:05:23 UTC 2014


---
 src/pacman/util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index 36f4414..f63ac1b 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -284,6 +284,7 @@ void indentprint(const char *str, unsigned short indent, unsigned short cols)
 	cidx = indent;
 
 	if(!p || !len) {
+		free(wcstr);
 		return;
 	}
 
-- 
2.2.0


More information about the pacman-dev mailing list