1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

network: clear previous assignment

Prompted by oss-fuzz#13719.
This commit is contained in:
Yu Watanabe 2019-03-16 00:11:22 +09:00
parent c7a67ba5eb
commit 50969cff60

View File

@ -629,9 +629,9 @@ int config_parse_l2tp_session_name(
return 0;
}
session->name = strdup(rvalue);
if (!session->name)
return -ENOMEM;
r = free_and_strdup(&session->name, rvalue);
if (r < 0)
return log_oom();
session = NULL;
return 0;