diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-08-06 10:06:15 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-08-06 10:06:15 +0300 |
commit | f003a1fa80f952886362ae12051950fc71f4e6b7 (patch) | |
tree | 2247f026f759bf0a21ae6fa36e418f0124b0c705 | |
parent | b747102da75de64972ad7101ee2cbb5416008b30 (diff) | |
parent | 92d0218ed10160cc54bcd06334e26dfd2b88dd7a (diff) |
Merge pull request #893 from zonque/networkd
libsystemd-network: plug memory leak
-rw-r--r-- | src/libsystemd-network/sd-dhcp-lease.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c index eae186c9d3..e0874aebad 100644 --- a/src/libsystemd-network/sd-dhcp-lease.c +++ b/src/libsystemd-network/sd-dhcp-lease.c @@ -965,8 +965,10 @@ int sd_dhcp_lease_load(sd_dhcp_lease **ret, const char *lease_file) { return r; r = dhcp_lease_insert_private_option(lease, DHCP_OPTION_PRIVATE_BASE + i, data, len); - if (r < 0) + if (r < 0) { + free(data); return r; + } } *ret = lease; |