forked from pool/systemd
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
|
From edf029b7fd9a5853a87d3ca99aac2922bb8a277e Mon Sep 17 00:00:00 2001
|
||
|
From: Tom Gundersen <teg@jklm.no>
|
||
|
Date: Wed, 4 Jun 2014 12:34:23 +0200
|
||
|
Subject: [PATCH] udev: link-config - fix mem leak
|
||
|
|
||
|
Reported by Kay.
|
||
|
|
||
|
Signed-off-by: Robert Milasan <rmilasan@suse.com>
|
||
|
---
|
||
|
src/udev/net/link-config.c | 4 +++-
|
||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||
|
|
||
|
Index: systemd-210/src/udev/net/link-config.c
|
||
|
===================================================================
|
||
|
--- systemd-210.orig/src/udev/net/link-config.c
|
||
|
+++ systemd-210/src/udev/net/link-config.c
|
||
|
@@ -118,6 +118,7 @@ static void link_configs_free(link_confi
|
||
|
free(link->match_type);
|
||
|
free(link->description);
|
||
|
free(link->alias);
|
||
|
+ free(link->name_policy);
|
||
|
|
||
|
free(link);
|
||
|
}
|
||
|
@@ -205,7 +206,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);
|
||
|
|