summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-dhcp-lease.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-lease.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-lease.c')
-rw-r--r--src/libsystemd-network/sd-dhcp-lease.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c
index 159bb502c8..aa479ffe15 100644
--- a/src/libsystemd-network/sd-dhcp-lease.c
+++ b/src/libsystemd-network/sd-dhcp-lease.c
@@ -271,7 +271,7 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const uint8_t *option,
}
int dhcp_lease_new(sd_dhcp_lease **ret) {
- _cleanup_dhcp_lease_unref_ sd_dhcp_lease *lease = NULL;
+ sd_dhcp_lease *lease;
lease = new0(sd_dhcp_lease, 1);
if (!lease)
@@ -280,8 +280,6 @@ int dhcp_lease_new(sd_dhcp_lease **ret) {
lease->n_ref = REFCNT_INIT;
*ret = lease;
- lease = NULL;
-
return 0;
}