diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-01-19 19:50:17 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-01-20 18:55:55 -0500 |
commit | 63a54aa15edee5ecadd894d2d5c73870d86e8ec4 (patch) | |
tree | 3a36df73d4536b2f6574ff69db215e17d12c0e9b /src | |
parent | b14fff6e44eec1752bed2fbb8c5e8f376ea9507b (diff) |
libsystemd-network: avoid double free on error
This could happen if the remote sent us a badly formatted
option.
CID #1317206.
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd-network/sd-dhcp6-lease.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-lease.c b/src/libsystemd-network/sd-dhcp6-lease.c index 3f32ba35e7..327759e180 100644 --- a/src/libsystemd-network/sd-dhcp6-lease.c +++ b/src/libsystemd-network/sd-dhcp6-lease.c @@ -256,7 +256,7 @@ int dhcp6_lease_set_ntp(sd_dhcp6_lease *lease, uint8_t *optval, size_t optlen) { assert_return(lease, -EINVAL); assert_return(optval, -EINVAL); - free(lease->ntp); + lease->ntp = mfree(lease->ntp); lease->ntp_count = 0; lease->ntp_allocated = 0; |