Hello,

[contrib/halog/halog.c:1572]: (error) Memory leak: ustat
From e58f1f8989715b2fa0c47c9169985d665c32c487 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <[email protected]>
Date: Fri, 22 Sep 2017 22:33:16 +0500
Subject: [PATCH] BUG/MINOR: contrib/halog: fixing small memory leak

Issue was identified by cppcheck
---
 contrib/halog/halog.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/halog/halog.c b/contrib/halog/halog.c
index fc927bdd..cb815d8c 100644
--- a/contrib/halog/halog.c
+++ b/contrib/halog/halog.c
@@ -1569,6 +1569,7 @@ void filter_count_url(const char *accept_field, const char *time_field, struct t
 
 	if (unlikely(!*e)) {
 		truncated_line(linenum, line);
+		free(ustat);
 		return;
 	}
 
-- 
2.13.3

Reply via email to