forked from enlightenment/efl
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
This commit is contained in:
parent
048d52f086
commit
ca2e2af522
|
@ -158,6 +158,7 @@ _extnbuf_lock_file_set(Extnbuf *b, const char *file)
|
||||||
if (b->am_owner) return EINA_FALSE;
|
if (b->am_owner) return EINA_FALSE;
|
||||||
if (b->lock) eina_stringshare_del(b->lock);
|
if (b->lock) eina_stringshare_del(b->lock);
|
||||||
if (b->lockfd >= 0) close(b->lockfd);
|
if (b->lockfd >= 0) close(b->lockfd);
|
||||||
|
b->lockfd = -1;
|
||||||
if (!file)
|
if (!file)
|
||||||
{
|
{
|
||||||
b->lock = NULL;
|
b->lock = NULL;
|
||||||
|
|
Loading…
Reference in New Issue