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
This commit is contained in:
Beniamino Galvani 2019-06-13 17:00:34 +02:00
parent 46f81e18f7
commit 106c156b0f

View file

@ -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);