1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00

sd-dhcp-client: test - don't close socket twice

One end of the socketpair is closed by the library, so only close our end. Also switch to
the safe_close() so we get notified about problems with closing.
This commit is contained in:
Tom Gundersen 2014-03-22 10:52:49 +01:00
parent c6f7c917a1
commit 2afa65c312

View File

@ -253,8 +253,7 @@ static void test_discover_message(sd_event *e)
sd_dhcp_client_stop(client);
sd_dhcp_client_free(client);
close(test_fd[0]);
close(test_fd[1]);
test_fd[1] = safe_close(test_fd[1]);
callback_recv = NULL;
}
@ -482,8 +481,7 @@ static void test_addr_acq(sd_event *e)
sd_dhcp_client_stop(client);
sd_dhcp_client_free(client);
close(test_fd[0]);
close(test_fd[1]);
test_fd[1] = safe_close(test_fd[1]);
callback_recv = NULL;
xid = 0;