summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-04-14 18:02:15 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-04-14 18:32:58 +0200
commit8283c71b7141afc6ad69dc7913311aa01e8221dd (patch)
treeb6dd39fd90122efc8d140c23e8c772e1cb6683a6
parent5a917c064b23c1b8a12d6abd2f9f31c575ddebc6 (diff)
sd-dhcp6-client: unref lease when freeing the client
-rw-r--r--src/libsystemd-network/sd-dhcp6-client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
index 9d88d469f3..cd33237eb5 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libsystemd-network/sd-dhcp6-client.c
@@ -1205,6 +1205,8 @@ sd_dhcp6_client *sd_dhcp6_client_unref(sd_dhcp6_client *client) {
client_reset(client);
sd_dhcp6_client_detach_event(client);
+ if (client->lease)
+ sd_dhcp6_lease_unref(client->lease);
free(client->req_opts);
free(client);