summaryrefslogtreecommitdiff
path: root/src/udev/net/link-config.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-06-04 12:34:23 +0200
committerTom Gundersen <teg@jklm.no>2014-06-04 12:55:23 +0200
commitedf029b7fd9a5853a87d3ca99aac2922bb8a277e (patch)
treef22a72b259ac08b4766ae86c45cfb121e7d04249 /src/udev/net/link-config.c
parentf3a740a5dae792fb6b2d411022ce8c29ced1c3f1 (diff)
udev: link-config - fix mem leak
Reported by Kay.
Diffstat (limited to 'src/udev/net/link-config.c')
-rw-r--r--src/udev/net/link-config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index 8234598e45..a9acc3ddb7 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -118,6 +118,7 @@ static void link_configs_free(link_config_ctx *ctx) {
free(link->match_type);
free(link->description);
free(link->alias);
+ free(link->name_policy);
free(link);
}
@@ -204,7 +205,8 @@ static bool enable_name_policy(void) {
int link_config_load(link_config_ctx *ctx) {
int r;
- char **files, **f;
+ _cleanup_strv_free_ char **files;
+ char **f;
link_configs_free(ctx);