From 477e73b5312094f2d34de8e40ccbe61e6d4d81e9 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Thu, 2 Jan 2014 19:49:49 -0500 Subject: networkd: fix memory leak in error path --- src/network/networkd-network.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 9533aff8e3..3cbc9aba26 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -24,6 +24,7 @@ #include "path-util.h" #include "conf-files.h" #include "conf-parser.h" +#include "util.h" static int network_load_one(Manager *manager, const char *filename) { _cleanup_network_free_ Network *network = NULL; @@ -77,7 +78,8 @@ static int network_load_one(Manager *manager, const char *filename) { int network_load(Manager *manager) { Network *network; - char **files, **f; + _cleanup_strv_free_ char **files = NULL; + char **f; int r; assert(manager); @@ -97,8 +99,6 @@ int network_load(Manager *manager) { return r; } - strv_free(files); - return 0; } -- cgit v1.2.3-54-g00ecf