From: Hermet Park Date: Mon, 18 Feb 2019 06:09:44 +0000 (+0900) Subject: evas vg: check for OOM when calloc() X-Git-Tag: submit/tizen/20190222.001114~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=424738ccb9d1514de15de8616b6d32cd75b1c758;p=platform%2Fupstream%2Fefl.git evas vg: check for OOM when calloc() Change-Id: I665ba9dd1d1955071f75ce0d57827c830829996e --- diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index 396c4db..9c69b14 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -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