From 9f6ba7c4fa5fdca83d4f246797b055ed2f92cd8b Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 18 Feb 2019 15:02:47 +0900 Subject: [PATCH] evas vg: check for OOM when calloc() Change-Id: I0c5f9cbc407b508e3dd7a635bd4af6298879fc9c --- src/static_libs/vg_common/vg_common_svg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index 703ebde..c17b024 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -884,6 +884,7 @@ _create_gradient_node(Efl_VG *vg) unsigned int count = 0, i; Svg_Style_Gradient *grad = calloc(1, sizeof(Svg_Style_Gradient)); + EINA_SAFETY_ON_NULL_RETURN_VAL(grad, NULL); grad->spread = evas_vg_gradient_spread_get(vg); evas_vg_gradient_stop_get(vg, &stops, &count); -- 2.7.4