mirror of
https://github.com/systemd/systemd.git
synced 2026-07-12 10:34:12 +00:00
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.
This commit is contained in:
committed by
Tom Gundersen
parent
3e09eb5c83
commit
f8a0bb5285
Notes:
Zbigniew Jędrzejewski-Szmek
2014-06-16 19:00:17 -04:00
Backport: fix
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user