mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-20 22:20:38 +02:00
Revert "systemd: fix potential memory leaks"
@random_data is declared as _cleanup_free_.
Freeing it is unnecessary and freeing without clearing the
pointer leads do a double free.
This reverts commit 3d1557eaad.
This commit is contained in:
parent
4eab8191eb
commit
27835ba73c
1 changed files with 1 additions and 3 deletions
|
|
@ -211,10 +211,8 @@ int sd_ipv4ll_set_address_seed(sd_ipv4ll *ll, unsigned seed) {
|
|||
return -ENOMEM;
|
||||
|
||||
random_data_state = new0(char, 128);
|
||||
if (!random_data_state) {
|
||||
free(random_data);
|
||||
if (!random_data_state)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
r = initstate_r(seed, random_data_state, 128, random_data);
|
||||
if (r < 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue