evas vg: check for OOM when calloc()
authorHermet Park <hermetpark@gmail.com>
Mon, 18 Feb 2019 06:09:44 +0000 (15:09 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 8 Mar 2019 11:49:34 +0000 (20:49 +0900)
src/static_libs/vg_common/vg_common_svg.c

index c55a057..6b18a0e 100644 (file)
@@ -847,8 +847,7 @@ _create_node(Svg_Node *parent, Svg_Node_Type type)
    if (!node->style)
      {
         free(node);
-        ERR("OOM: Failed calloc()");
-        return NULL;
+        EINA_SAFETY_ON_NULL_RETURN_VAL(node->style, NULL);
      }
 
    // update the default value of stroke and fill