From 3891bdcb15455e4482b75cb0d60d8e69e101d1c2 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Mon, 8 Jul 2013 14:18:06 +0100 Subject: [PATCH] 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 --- src/lib/eet/eet_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c index c9d5cb0373..efbad79267 100644 --- a/src/lib/eet/eet_lib.c +++ b/src/lib/eet/eet_lib.c @@ -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);