BIND 10 trac805-merged, updated. 61d3224981ddac0ce238e61378dff60996288c21 [805-merged] suggested changes: check non 0 result of send_fd in general; close the function if send_fd fails.
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jan 6 19:25:46 UTC 2012
The branch, trac805-merged has been updated
via 61d3224981ddac0ce238e61378dff60996288c21 (commit)
from 526b0b5b5615cd258335b14c6417ee26f0d671f5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 61d3224981ddac0ce238e61378dff60996288c21
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Jan 6 11:24:47 2012 -0800
[805-merged] suggested changes: check non 0 result of send_fd in general;
close the function if send_fd fails.
-----------------------------------------------------------------------
Summary of changes:
src/bin/sockcreator/sockcreator.cc | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/sockcreator/sockcreator.cc b/src/bin/sockcreator/sockcreator.cc
index 4a64790..a1bf3d5 100644
--- a/src/bin/sockcreator/sockcreator.cc
+++ b/src/bin/sockcreator/sockcreator.cc
@@ -131,7 +131,11 @@ run(const int input_fd, const int output_fd, const get_sock_t get_sock,
if (result >= 0) { // We got the socket
WRITE("S", 1);
// FIXME: Check the output and write a test for it
- if (send_fd_fun(output_fd, result) == FD_SYSTEM_ERROR) {
+ if (send_fd_fun(output_fd, result) != 0) {
+ // We'll soon abort ourselves, but make sure we still
+ // close the socket; don't bother if it fails as the
+ // higher level result (abort) is the same.
+ close_fun(result);
return 3;
}
// Don't leak the socket
More information about the bind10-changes
mailing list