1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

sysctl: fix uninitalized memory access in error path

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]
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2013-02-13 09:55:32 -05:00
parent 5f9cfd4c38
commit f04e95ba6b

View File

@ -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;
}