forked from enlightenment/efl
evas vg: check for OOM when calloc()
This commit is contained in:
parent
a921040743
commit
0a47a0ef32
|
@ -844,6 +844,11 @@ _create_node(Svg_Node *parent, Svg_Node_Type type)
|
|||
|
||||
// default fill property
|
||||
node->style = calloc(1, sizeof(Svg_Style_Property));
|
||||
if (!node->style)
|
||||
{
|
||||
free(node);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(node->style, NULL);
|
||||
}
|
||||
|
||||
// update the default value of stroke and fill
|
||||
//https://www.w3.org/TR/SVGTiny12/painting.html#SpecifyingPaint
|
||||
|
|
Loading…
Reference in New Issue