summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-06-05 14:15:54 +0530
committerAnand Avati <avati@redhat.com>2012-06-05 10:45:10 -0700
commit6eee473eba94697953e8b3e1b04fe5ef1de5f474 (patch)
treed435b4f4186690907c39a28257f3707ea86bbeb1 /rpc/rpc-transport
parent04fd2972fe8a9b9568ac781ba7677f13fdce0f57 (diff)
core: coverity fixes (mostly resource leak fixes)
currently working on obvious resource leak reports in coverity Change-Id: I261f4c578987b16da399ab5a504ad0fda0b176b1 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 789278 Reviewed-on: http://review.gluster.com/3265 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'rpc/rpc-transport')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index d193c93cea0..cf30e7d7d50 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -314,7 +314,7 @@ __socket_server_bind (rpc_transport_t *this)
memcpy (&unix_addr, SA (&this->myinfo.sockaddr),
this->myinfo.sockaddr_len);
reuse_check_sock = socket (AF_UNIX, SOCK_STREAM, 0);
- if (reuse_check_sock > 0) {
+ if (reuse_check_sock >= 0) {
ret = connect (reuse_check_sock, SA (&unix_addr),
this->myinfo.sockaddr_len);
if ((ret == -1) && (ECONNREFUSED == errno)) {