devilhorns pushed a commit to branch master.

commit 3891bdcb15455e4482b75cb0d60d8e69e101d1c2
Author: Chris Michael <[email protected]>
Date:   Mon Jul 8 14:18:06 2013 +0100

    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 <[email protected]>
---
 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 c9d5cb0..efbad79 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);

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to