devilhorns pushed a commit to branch master.

commit a97f3c0b9bb86eb962e5296f174a0dcb51134350
Author: Chris Michael <[email protected]>
Date:   Mon Aug 5 13:01:52 2013 +0100

    Fix eina_file_virtual_map_new function (/me glares at Frenchie).
     - Spank Cedric !!!!!
    
    NB: How about we actually fill in "map" after allocation ??
    
    NB: Previously we would malloc "map" and immediately exit without
    filling it in, without adding it to the hash....nothing. Just allocate
    and get out. Bad Frenchie !!!
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/eina/eina_file_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c
index 91eec16..2ff776a 100644
--- a/src/lib/eina/eina_file_common.c
+++ b/src/lib/eina/eina_file_common.c
@@ -179,7 +179,7 @@ eina_file_virtual_map_new(Eina_File *file,
    if (!map)
      {
         map = malloc(sizeof (Eina_File_Map));
-        goto on_error;
+        if (!map) goto on_error;
 
         map->map = ((char*) file->global_map) + offset;
         map->offset = offset;

-- 

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk

Reply via email to