From: Christopher Michael Date: Wed, 24 Apr 2019 12:56:00 +0000 (-0400) Subject: static_libs/vg_common: Fix resource leak X-Git-Tag: submit/tizen/20190430.023700~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=31737097c73e1a1348c47cc87b0863c81fc7da02;p=platform%2Fupstream%2Fefl.git static_libs/vg_common: Fix resource leak Coverity reports a resource leak here. The function _create_node returns allocated storage which should be freed when we are finished with it. Fixes CID1382215 @fix --- diff --git a/src/static_libs/vg_common/vg_common_svg.c b/src/static_libs/vg_common/vg_common_svg.c index 9cb4b9e..00e7e04 100644 --- a/src/static_libs/vg_common/vg_common_svg.c +++ b/src/static_libs/vg_common/vg_common_svg.c @@ -1060,6 +1060,8 @@ vg_common_create_svg_node_helper(Efl_VG *vg, Svg_Node *parent) memcpy(svg_node->node.command.points, points, sizeof (double) * points_count); _apply_svg_property(svg_node, vg); } + + free(svg_node); } Svg_Node *