util: replace close_pipe() with new safe_close_pair()

safe_close_pair() is more like safe_close(), except that it handles
pairs of fds, and doesn't make and misleading allusion, as it works
similarly well for socketpairs() as for pipe()s...
This commit is contained in:
Lennart Poettering
2014-03-24 03:22:44 +01:00
parent 6a0f1f6d5a
commit 3d94f76c99
18 changed files with 37 additions and 43 deletions
+2 -2
View File
@@ -79,8 +79,8 @@ static void connection_free(Connection *c) {
safe_close(c->server_fd);
safe_close(c->client_fd);
close_pipe(c->server_to_client_buffer);
close_pipe(c->client_to_server_buffer);
safe_close_pair(c->server_to_client_buffer);
safe_close_pair(c->client_to_server_buffer);
free(c);
}