summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp-client.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-10 23:45:46 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-04-12 10:20:55 -0400
commit6e00a80641aaba814204c65365c2fd5a90768394 (patch)
tree9dfcadbe149722a8ec26dfa2950c54d07a8441f1 /src/libsystemd-network/sd-dhcp-client.c
parentca2d37841476e6272c9957c3f5a0cbe869a531ca (diff)
test-dhcp-client: unref lease objects to make valgrind happy
Also unref client objects in test code, and initalize logging, to DEBUG by default.
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);