Signed-off-by: Jan Friesse <[email protected]>
---
 exec/totemip.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/exec/totemip.c b/exec/totemip.c
index cc10344..ab175a8 100644
--- a/exec/totemip.c
+++ b/exec/totemip.c
@@ -540,7 +540,10 @@ int totemip_iface_check(struct totem_ip_address *bindnet,
        if (fd <0)
                return -1;
 
-        setsockopt(fd,SOL_SOCKET,SO_RCVBUF,&rcvbuf,sizeof(rcvbuf));
+        if (setsockopt(fd,SOL_SOCKET,SO_RCVBUF,&rcvbuf,sizeof(rcvbuf)) == -1) {
+               close(fd);
+               return -1;
+       }
 
         memset(&nladdr, 0, sizeof(nladdr));
         nladdr.nl_family = AF_NETLINK;
-- 
1.7.1

_______________________________________________
discuss mailing list
[email protected]
http://lists.corosync.org/mailman/listinfo/discuss

Reply via email to