From 76bffbc3e452ec898483d61a8c649ac6dcf8a9d8 Mon Sep 17 00:00:00 2001 From: Fabien Thomas Date: Thu, 24 Aug 2006 15:54:10 +0000 Subject: [PATCH] correct fd leak on error case git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1229 fd59a12c-fef9-0310-b244-a6a79926bd2f --- lib/util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/util.c b/lib/util.c index bbe8ef0b..94ca6ee2 100644 --- a/lib/util.c +++ b/lib/util.c @@ -170,6 +170,7 @@ saServiceConnect ( /* if I comment out the 4 lines below the executive crashes */ callbackFD = socket (PF_UNIX, SOCK_STREAM, 0); if (callbackFD == -1) { + close (responseFD); return (SA_AIS_ERR_NO_RESOURCES); }