summaryrefslogtreecommitdiff
path: root/src/libsystemd-dhcp
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-12-20 17:16:13 +0200
committerTom Gundersen <teg@jklm.no>2013-12-22 14:28:00 +0100
commit2ed0375c2db786012842f02b84014a70c4806017 (patch)
treef1dab4892f33d171ead389fdfcb7cbb7ff215854 /src/libsystemd-dhcp
parent20d471b933890fb47e8f0be499bfd7b40acbd60c (diff)
libsystemd-dhcp: Unref event source before closing socket
Diffstat (limited to 'src/libsystemd-dhcp')
-rw-r--r--src/libsystemd-dhcp/dhcp-client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd-dhcp/dhcp-client.c b/src/libsystemd-dhcp/dhcp-client.c
index 043d574c10..18a6e3c50d 100644
--- a/src/libsystemd-dhcp/dhcp-client.c
+++ b/src/libsystemd-dhcp/dhcp-client.c
@@ -892,10 +892,10 @@ static int client_receive_raw_message(sd_event_source *s, int fd,
client_notify(client, DHCP_EVENT_IP_ACQUIRE);
- close(client->fd);
- client->fd = -1;
client->receive_message =
sd_event_source_unref(client->receive_message);
+ close(client->fd);
+ client->fd = -1;
}
r = 0;