Fix static analysis issue 08/213308/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Wed, 4 Sep 2019 06:30:29 +0000 (15:30 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Wed, 4 Sep 2019 06:30:59 +0000 (15:30 +0900)
Remove unnecessary null checking.

Change-Id: I7c86b64e0cfe496c6b361f696b546a7ac7707438
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/wgt/step/filesystem/step_wgt_patch_icons.cc

index 89c5b35..1522b1b 100644 (file)
@@ -45,8 +45,7 @@ bool PatchIcon(icon_x* icon, const bf::path& dst_path, bool make_copy) {
       return false;
     }
   }
-  if (icon->text)
-    free(const_cast<char*>(icon->text));
+  free(const_cast<char*>(icon->text));
   icon->text = strdup(icon_path.c_str());
 
   return true;