]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp6-client: unref lease when freeing the client
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Tue, 14 Apr 2015 16:02:15 +0000 (18:02 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Tue, 14 Apr 2015 16:32:58 +0000 (18:32 +0200)
src/libsystemd-network/sd-dhcp6-client.c

index 9d88d469f3753fe800ab6e0e244c4f9e051220f6..cd33237eb5686c77366c9d83b844a117bfe34593 100644 (file)
@@ -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);