From 91ffff9621757cb585bfce1cafc98218f89cc466 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Wed, 20 Nov 2013 17:51:42 +0100 Subject: [PATCH] conf-parser: don't leak section names If we encounter an unknown section, we must free the previous section before clearing the pointer. --- src/shared/conf-parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index efd2147..95d64fc 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -260,6 +260,7 @@ static int parse_line(const char* unit, "Unknown section '%s'. Ignoring.", n); free(n); + free(*section); *section = NULL; } else { free(*section); -- 2.7.4