diff options
author | Andreas Henriksson <andreas@fatal.se> | 2014-06-13 18:48:21 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-06-13 19:00:42 +0200 |
commit | f8a0bb5285024b6ce372c3157e761e6543ebdcd2 (patch) | |
tree | ed475bc83ddae525dde1e89337db7abf62795c60 /src/udev/net/link-config.c | |
parent | 3e09eb5c83e56bc0184bd9d9c44f76047464f77c (diff) |
udev: fix invalid free() in enable_name_policy()
static bool enable_name_policy(...) in ./src/udev/net/link-config.c
calls proc_cmdline(...) to get "line" initialized, but
proc_cmdline(...) does not guarantee that atleast when both
conditions (detect_container(NULL) > 0) and
read_full_file(...) returned < 0.
Diffstat (limited to 'src/udev/net/link-config.c')
-rw-r--r-- | src/udev/net/link-config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index a9acc3ddb7..7a9d01bc18 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -185,7 +185,7 @@ static int load_link(link_config_ctx *ctx, const char *filename) { } static bool enable_name_policy(void) { - _cleanup_free_ char *line; + _cleanup_free_ char *line = NULL; char *w, *state; int r; size_t l; |