From f04e95ba6b861fc7d00e16d3d912a01aa7d286de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 13 Feb 2013 09:55:32 -0500 Subject: [PATCH] sysctl: fix uninitalized memory access in error path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/sysctl/sysctl.c: In function ‘parse_file’: src/sysctl/sysctl.c:172:41: warning: ‘property’ may be used uninitialized in this function [-Wmaybe-uninitialized] --- src/sysctl/sysctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index f59a8583236..a8cbb5a326d 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -169,7 +169,8 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno existing = hashmap_get(sysctl_options, p); if (existing) { if (!streq(value, existing)) - log_warning("Two ore more conflicting assignments of %s, ignoring.", property); + log_warning("Duplicate assignment of %s in file '%s', ignoring.", + p, path); continue; }