From: Michal Szczecinski Date: Thu, 15 Apr 2021 16:33:21 +0000 (+0200) Subject: evas_vg: Fixed possible memory leak in svg loader. X-Git-Tag: submit/tizen/20210420.103606~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c03638bb4825c63d9185b5d7888acabdcb31d2d;p=platform%2Fupstream%2Fefl.git evas_vg: Fixed possible memory leak in svg loader. Memory leak was caused by SVG's which mask nodes. In case of mask it was not added to parent, and because of that it was not relased when parent node was destroyed. Change-Id: I5b443c8f31be0626660cc6b8add13933c42b4e39 --- diff --git a/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c b/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c index 77058b9..bf798f5 100644 --- a/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c +++ b/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c @@ -1145,10 +1145,9 @@ _create_switch_node(Evas_SVG_Loader *loader EINA_UNUSED, Svg_Node *parent EINA_U } static Svg_Node * -_create_mask_node(Evas_SVG_Loader *loader EINA_UNUSED, Svg_Node *parent EINA_UNUSED, const char *buf EINA_UNUSED, unsigned buflen EINA_UNUSED) +_create_mask_node(Evas_SVG_Loader *loader EINA_UNUSED, Svg_Node *parent, const char *buf EINA_UNUSED, unsigned buflen EINA_UNUSED) { - Svg_Node *node = _create_node(NULL, SVG_NODE_UNKNOWN); - + Svg_Node *node = _create_node(parent, SVG_NODE_UNKNOWN); node->display = EINA_FALSE; return node; }