if (!gBufMgr)
{
_tbm_set_last_result (TBM_BO_ERROR_HEAP_ALLOC_FAILED);
+ if (fd_flag)
+ close(fd);
+
pthread_mutex_unlock (&gLock);
return NULL;
}
TBM_LOG ("[libtbm:%d] "
"error : Fail to load bufmgr backend\n",
getpid());
+ close (gBufMgr->fd);
free (gBufMgr);
gBufMgr = NULL;
pthread_mutex_unlock (&gLock);
gBufMgr->backend->bufmgr_deinit (gBufMgr->backend->priv);
tbm_backend_free (gBufMgr->backend);
dlclose (gBufMgr->module_data);
+ close (gBufMgr->fd);
free (gBufMgr);
gBufMgr = NULL;
pthread_mutex_unlock (&gLock);
tbm_backend_free (gBufMgr->backend);
pthread_mutex_destroy (&gBufMgr->lock);
dlclose (gBufMgr->module_data);
+ close (gBufMgr->fd);
free (gBufMgr);
gBufMgr = NULL;
pthread_mutex_unlock (&gLock);