mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
Merge pull request #28232 from rpigott/ndisc-captive-portal-mfree
ndisc: clear ndisc captive portal value on bogus zero-len option
This commit is contained in:
commit
c470513eea
@ -734,7 +734,7 @@ static int ndisc_router_process_captive_portal(Link *link, sd_ndisc_router *rt)
|
||||
return r;
|
||||
|
||||
if (len == 0) {
|
||||
mfree(link->ndisc_captive_portal);
|
||||
link->ndisc_captive_portal = mfree(link->ndisc_captive_portal);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -743,7 +743,7 @@ static int ndisc_router_process_captive_portal(Link *link, sd_ndisc_router *rt)
|
||||
return r;
|
||||
|
||||
if (!in_charset(captive_portal, URI_VALID))
|
||||
return -EINVAL;
|
||||
return -EBADMSG;
|
||||
|
||||
if (!streq_ptr(link->ndisc_captive_portal, captive_portal)) {
|
||||
free_and_replace(link->ndisc_captive_portal, captive_portal);
|
||||
|
Loading…
Reference in New Issue
Block a user