diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-06 10:03:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-06 11:57:45 +0000 |
commit | 0ddae2167e7d52bf0f2bda323100f5ebb4ab3dc0 (patch) | |
tree | e318d2c7969e5c2ea69329c5bde8d7daf3a1397b /sal | |
parent | f8a1adaaa395a51e952e42ae61ff8af70741dd56 (diff) |
coverity#705403 Argument cannot be negative
Change-Id: I0cf67a4bd5ec95e135511611c236350d4347895e
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/pipe.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sal/osl/unx/pipe.c b/sal/osl/unx/pipe.c index b3d108574dac..e271e943900d 100644 --- a/sal/osl/unx/pipe.c +++ b/sal/osl/unx/pipe.c @@ -383,6 +383,11 @@ void SAL_CALL osl_closePipe( oslPipe pPipe ) pPipe->m_bIsInShutdown = sal_True; pPipe->m_Socket = -1; fd = socket(AF_UNIX, SOCK_STREAM, 0); + if ( fd < 0 ) + { + OSL_TRACE("socket in osl_destroyPipe failed with error: %s", strerror(errno)); + return; + } memset(&addr, 0, sizeof(addr)); OSL_TRACE("osl_destroyPipe : Pipe Name '%s'",pPipe->m_Name); |