edje_cc: Fix dereference before null check
authorChris Michael <cp.michael@samsung.com>
Thu, 25 Jun 2015 18:59:28 +0000 (14:59 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 25 Jun 2015 18:59:28 +0000 (14:59 -0400)
Summary: Fix Coverity CID1302700 which reports a dereference before
null check. Basically, it is safe to call free() with a possible NULL
value so we can remove the 'if' check here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/bin/edje/edje_cc_out.c

index be534aa..24066ad 100755 (executable)
@@ -1065,7 +1065,7 @@ data_write_images(Eet_File *ef, int *image_num)
                     }
                   else
                     {
-                       if (iw) free(iw);
+                       free(iw);
                        error_and_abort_image_load_error
                          (ef, img->entry, load_err);
                        exit(1); // ensure static analysis tools know we exit