summaryrefslogtreecommitdiff
path: root/src/lib/evas/cserve2/evas_cs2_client.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-10-29 15:03:14 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-29 15:08:19 +0900
commit44f89bb8ade404604867fd270d53a3952ba513df (patch)
tree454f0f76c37ed2b0eef5c93bb448fff9daf7295c /src/lib/evas/cserve2/evas_cs2_client.c
parent10f80df01825066987452b11a9ec785555540c64 (diff)
evas/cserve2: Fix CID 1039286 (Resource leak)
Close socket in case of connection failure.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index 5410b0b212..0d5fe2cefc 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -187,6 +187,7 @@ _server_connect(void)
187 if (errno == EACCES) 187 if (errno == EACCES)
188 { 188 {
189 ERR("not authorized to connect to cserve2!"); 189 ERR("not authorized to connect to cserve2!");
190 close(s);
190 return EINA_FALSE; 191 return EINA_FALSE;
191 } 192 }
192 ERR("cserve2 connect failed: [%d] %s. Retrying...", errno, strerror(errno)); 193 ERR("cserve2 connect failed: [%d] %s. Retrying...", errno, strerror(errno));
@@ -196,6 +197,7 @@ _server_connect(void)
196 if (errno == EINTR) 197 if (errno == EINTR)
197 { 198 {
198 WRN("received interruption while trying to connect to cserve2!"); 199 WRN("received interruption while trying to connect to cserve2!");
200 close(s);
199 return EINA_FALSE; 201 return EINA_FALSE;
200 } 202 }
201 203