chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c0dda18
)
sd-dhcp-client: prevent timer related memory leaks
author
Umut Tezduyar Lindskog
<umut.tezduyar@axis.com>
Thu, 20 Feb 2014 20:04:03 +0000
(21:04 +0100)
committer
Tom Gundersen
<teg@jklm.no>
Thu, 20 Feb 2014 21:12:25 +0000
(22:12 +0100)
src/libsystemd-dhcp/sd-dhcp-client.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-dhcp/sd-dhcp-client.c
b/src/libsystemd-dhcp/sd-dhcp-client.c
index ec2b53ffe19781ce843a9abbba094e106215bd4b..53abe2225720b1d91242bd0eb04725c0c2703c73 100644
(file)
--- a/
src/libsystemd-dhcp/sd-dhcp-client.c
+++ b/
src/libsystemd-dhcp/sd-dhcp-client.c
@@
-392,6
+392,8
@@
static int client_timeout_resend(sd_event_source *s, uint64_t usec,
next_timeout += (random_u32() & 0x1fffff);
+ client->timeout_resend = sd_event_source_unref(client->timeout_resend);
+
r = sd_event_add_monotonic(client->event,
&client->timeout_resend,
next_timeout,
@@
-477,6
+479,8
@@
static int client_initialize_events(sd_dhcp_client *client,
if (r < 0)
goto error;
+ client->timeout_resend = sd_event_source_unref(client->timeout_resend);
+
r = sd_event_add_monotonic(client->event,
&client->timeout_resend,
usec, 0,