static_libs/vg_common: Fix resource leak
authorChristopher Michael <cp.michael@samsung.com>
Wed, 24 Apr 2019 12:56:00 +0000 (08:56 -0400)
committerWoochanlee <wc0917.lee@samsung.com>
Tue, 30 Apr 2019 00:45:30 +0000 (09:45 +0900)
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

src/static_libs/vg_common/vg_common_svg.c

index 9cb4b9e..00e7e04 100644 (file)
@@ -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 *