提交 23b3e172 authored 作者: Michael Jerris's avatar Michael Jerris

don't leak file handle if fd = 0

上级 6f16e0d3
......@@ -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;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论