sd-dhcp6: fix domainname memleak
strv_extend() does not consume the passed entry, hence, we must properly free it. Furthermore, we should *not* use strv_consume() as we do greedy allocations on 'ret'; and greedy-allocations should only be used for short lived objects or caches. Fix the domainname parser to properly free temporary storage when done.
This commit is contained in:
parent
e6b18ffaea
commit
a00458421d
|
@ -405,7 +405,6 @@ int dhcp6_option_parse_domainname(const uint8_t *optval, uint16_t optlen,
|
|||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
ret = NULL;
|
||||
idx++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue