summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-02-18 15:07:01 +0900
committerHermet Park <hermetpark@gmail.com>2019-02-21 10:36:49 +0900
commita921040743aece335cd8040d3f28084c6932958c (patch)
treebf5876900f708e2798b391f56514e05fbd5efef7 /src/static_libs
parent1442690680d8d2b0e93d432b32a71db3c161e22d (diff)
evas vg: check for OOM when calloc()
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/vg_common/vg_common_svg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c
index c17b024..396c4db 100644
--- a/src/static_libs/vg_common/vg_common_svg.c
+++ b/src/static_libs/vg_common/vg_common_svg.c
@@ -823,6 +823,8 @@ vg_common_svg_create_vg_node(Svg_Node *node)
823 if (!node || (node->type != SVG_NODE_DOC)) return NULL; 823 if (!node || (node->type != SVG_NODE_DOC)) return NULL;
824 824
825 vg_data = calloc(1, sizeof(Vg_File_Data)); 825 vg_data = calloc(1, sizeof(Vg_File_Data));
826 EINA_SAFETY_ON_NULL_RETURN_VAL(vg_data, NULL);
827
826 vg_data->view_box.x = node->node.doc.vx; 828 vg_data->view_box.x = node->node.doc.vx;
827 vg_data->view_box.y = node->node.doc.vy; 829 vg_data->view_box.y = node->node.doc.vy;
828 vg_data->view_box.w = node->node.doc.vw; 830 vg_data->view_box.w = node->node.doc.vw;
@@ -838,6 +840,7 @@ static Svg_Node *
838_create_node(Svg_Node *parent, Svg_Node_Type type) 840_create_node(Svg_Node *parent, Svg_Node_Type type)
839{ 841{
840 Svg_Node *node = calloc(1, sizeof(Svg_Node)); 842 Svg_Node *node = calloc(1, sizeof(Svg_Node));
843 EINA_SAFETY_ON_NULL_RETURN_VAL(node, NULL);
841 844
842 // default fill property 845 // default fill property
843 node->style = calloc(1, sizeof(Svg_Style_Property)); 846 node->style = calloc(1, sizeof(Svg_Style_Property));