mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
don't leak file handle if fd = 0
This commit is contained in:
@@ -604,7 +604,7 @@ REDIS credis_connect(const char *host, int port, int timeout)
|
|||||||
return rhnd;
|
return rhnd;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (fd > 0)
|
if (fd >= 0)
|
||||||
close(fd);
|
close(fd);
|
||||||
cr_delete(rhnd);
|
cr_delete(rhnd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user