summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-client.c')
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index c67de71dd3..489220326e 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -805,6 +805,7 @@ static int client_handle_offer(sd_dhcp_client *client, DHCPMessage *offer,
}
}
+ sd_dhcp_lease_unref(client->lease);
client->lease = lease;
lease = NULL;
@@ -1330,6 +1331,8 @@ sd_dhcp_client *sd_dhcp_client_unref(sd_dhcp_client *client) {
sd_dhcp_client_detach_event(client);
+ sd_dhcp_lease_unref(client->lease);
+
free(client->req_opts);
free(client);