Fix missing unlock (reported by Coverity).

- Instead of just returning NULL, use the existing goto on_error to
handle the unlock and return NULL.

NB: Fixes Coverity CID1039383

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-07-08 14:18:06 +01:00
parent a9d0f3a919
commit 3891bdcb15
1 changed files with 1 additions and 1 deletions

View File

@ -1444,7 +1444,7 @@ eet_mmap(Eina_File *file)
/* Allocate struct for eet file and have it zero'd out */
ef = eet_file_malloc(1);
if (!ef) return NULL;
if (!ef) goto on_error;
/* fill some of the members */
INIT_FILE(ef);