summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-02 19:49:49 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-02 19:49:49 -0500
commit477e73b5312094f2d34de8e40ccbe61e6d4d81e9 (patch)
tree9b1c78bd4c78a10e65faeb9aa02b702c5938962b /src
parent7384fa923e1ba403454903133b33f559b735fe75 (diff)
networkd: fix memory leak in error path
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-network.c6
1 files 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;
}