forked from enlightenment/efl
evas/cserve2: Fix CID 1039286 (Resource leak)
Close socket in case of connection failure.
This commit is contained in:
parent
10f80df018
commit
44f89bb8ad
|
@ -187,6 +187,7 @@ _server_connect(void)
|
||||||
if (errno == EACCES)
|
if (errno == EACCES)
|
||||||
{
|
{
|
||||||
ERR("not authorized to connect to cserve2!");
|
ERR("not authorized to connect to cserve2!");
|
||||||
|
close(s);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
ERR("cserve2 connect failed: [%d] %s. Retrying...", errno, strerror(errno));
|
ERR("cserve2 connect failed: [%d] %s. Retrying...", errno, strerror(errno));
|
||||||
|
@ -196,6 +197,7 @@ _server_connect(void)
|
||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
{
|
{
|
||||||
WRN("received interruption while trying to connect to cserve2!");
|
WRN("received interruption while trying to connect to cserve2!");
|
||||||
|
close(s);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue