mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-02 01:25:11 +00:00
don't leak file handle if fd = 0
This commit is contained in:
1 parent
6f16e0d3da
commit
23b3e172d5
1 file changed
+1
-1
@@ -604,7 +604,7 @@ REDIS credis_connect(const char *host, int port, int timeout)
|
||||
return rhnd;
|
||||
|
||||
error:
|
||||
if (fd > 0)
|
||||
if (fd >= 0)
|
||||
close(fd);
|
||||
cr_delete(rhnd);
|
||||
return NULL;
|
||||
|
||||
Reference in new issue
Block a user