From 3f550c31b312538c92e76f176e54d3f217662cda Mon Sep 17 00:00:00 2001 From: Hristo Venev Date: Tue, 5 Dec 2017 16:51:23 +0200 Subject: [PATCH] networkd: fix memory leak in promote_secondaries_enabled --- src/network/networkd-dhcp4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 5ce03e5..ac1781d 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -590,7 +590,8 @@ static int dhcp4_set_hostname(Link *link) { } static bool promote_secondaries_enabled(const char *ifname) { - char *promote_secondaries_sysctl, *promote_secondaries_path; + _cleanup_free_ char *promote_secondaries_sysctl = NULL; + char *promote_secondaries_path; int r; promote_secondaries_path = strjoina("net/ipv4/conf/", ifname, "/promote_secondaries"); -- 2.7.4