edje_pick: Fix use after free
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 13 Jul 2016 02:16:33 +0000 (11:16 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 13 Jul 2016 02:16:33 +0000 (11:16 +0900)
Fixes CID 1267458 (trying again)

src/bin/edje/edje_pick.c

index 7b5d73d..ce34ed5 100644 (file)
@@ -1474,12 +1474,12 @@ main(int argc, char **argv)
              }
 
              free(edc);
-             _edje_cache_file_unref(edf);
              edje_cache_emp_free(ce);
              eet_close(ef);
           }
 
         _edje_pick_images_copy(edf, out_file);  /* Add Images to imagelist */
+        _edje_cache_file_unref(edf);
 
         /* We SKIP writing source, just can't compose it */
         /* FIXME: use Edje_Edit code to generate source */