networkd: fix memory leak in promote_secondaries_enabled

This commit is contained in:
Hristo Venev 2017-12-05 16:51:23 +02:00
parent 8e1a72535c
commit 3f550c31b3
1 changed files with 2 additions and 1 deletions

View File

@ -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");