diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2019-06-13 17:00:34 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2019-07-05 11:09:28 +0200 |
commit | 106c156b0f6f8ba77f3dd2e144af3e1f4834ecc0 (patch) | |
tree | d4ffa477adc38b6668e74c64a9d77d88b232d598 | |
parent | 46f81e18f70eb62c92ac6d62c720bda59cf01dad (diff) | |
download | NetworkManager-106c156b0f6f8ba77f3dd2e144af3e1f4834ecc0.tar.gz |
n-dhcp4: client/probe: fix memory leak
The probe takes a reference to the current lease and so it must
release it upon destruction.
Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
https://github.com/nettools/n-dhcp4/pull/1
-rw-r--r-- | shared/n-dhcp4/src/n-dhcp4-c-probe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/shared/n-dhcp4/src/n-dhcp4-c-probe.c b/shared/n-dhcp4/src/n-dhcp4-c-probe.c index 67fedafffa..308cff8307 100644 --- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c +++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c @@ -483,6 +483,7 @@ _c_public_ NDhcp4ClientProbe *n_dhcp4_client_probe_free(NDhcp4ClientProbe *probe if (probe == probe->client->current_probe) probe->client->current_probe = NULL; + n_dhcp4_client_lease_unref(probe->current_lease); n_dhcp4_c_connection_deinit(&probe->connection); n_dhcp4_client_unref(probe->client); n_dhcp4_client_probe_config_free(probe->config); |