efreet_desktop: fix potential error in efreet_desktop_cache_create
authorSungtaek Hong <sth253.hong@samsung.com>
Wed, 7 Dec 2016 09:53:26 +0000 (18:53 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 07:23:59 +0000 (16:23 +0900)
 - old_file_ids is freed but not set as NULL.
   If it goes to error code, old_file_ids will be freed again.

   Differential Revision: https://phab.enlightenment.org/D4467

Change-Id: I22b24dc1480e8dce17e2588febfc2fd885970475
Signed-off-by: Sungtaek Hong <sth253.hong@samsung.com>
src/bin/efreet/efreet_desktop_cache_create.c

index 849c491..18955e0 100644 (file)
@@ -502,6 +502,7 @@ main(int argc, char **argv)
     {
         eina_hash_free(old_file_ids->hash);
         free(old_file_ids);
+        old_file_ids = NULL;
     }
 
     eina_hash_free(file_ids);