summaryrefslogtreecommitdiff
path: root/src/modules/ecore_evas/engines/extn
diff options
context:
space:
mode:
authorCedric BAIL <c.bail@partner.samsung.com>2014-07-30 03:47:31 +0200
committerCedric BAIL <c.bail@partner.samsung.com>2014-07-30 03:47:31 +0200
commitca2e2af52212bd28114b31b5abf049a2faf8f3fc (patch)
treea4ecef9cfb7d3857f45202470a1cc1686db239f7 /src/modules/ecore_evas/engines/extn
parent048d52f086e70180d70433c743e2c9b280776a55 (diff)
ecore_evas_extn: do not double close fd in case of memory starvation.
In case eina_stringshare_add was failing it could lead to a double close on lockfd. This was reported by coverity: CID1039885 @fix
Diffstat (limited to 'src/modules/ecore_evas/engines/extn')
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
index 017cf33f72..31f83dce5b 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_buf.c
@@ -158,6 +158,7 @@ _extnbuf_lock_file_set(Extnbuf *b, const char *file)
158 if (b->am_owner) return EINA_FALSE; 158 if (b->am_owner) return EINA_FALSE;
159 if (b->lock) eina_stringshare_del(b->lock); 159 if (b->lock) eina_stringshare_del(b->lock);
160 if (b->lockfd >= 0) close(b->lockfd); 160 if (b->lockfd >= 0) close(b->lockfd);
161 b->lockfd = -1;
161 if (!file) 162 if (!file)
162 { 163 {
163 b->lock = NULL; 164 b->lock = NULL;