From 1684ec92497eaee337a0d4e8c67c30f9d60d82bb Mon Sep 17 00:00:00 2001 From: Emre Ucan Date: Tue, 29 Mar 2016 15:08:53 +0200 Subject: ivi-controller: fix memory leak at update_surface_prop ivi_layout_get_get_layers_under_surface allocates memory. It is responsibility of the caller to free this memory, as it is stated in ivi-layout.c Therefore, the memory should be freed in the end of the function Signed-off-by: Emre Ucan --- weston-ivi-shell/src/ivi-controller-impl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weston-ivi-shell/src/ivi-controller-impl.c b/weston-ivi-shell/src/ivi-controller-impl.c index b7a9c48..5629234 100644 --- a/weston-ivi-shell/src/ivi-controller-impl.c +++ b/weston-ivi-shell/src/ivi-controller-impl.c @@ -287,6 +287,9 @@ update_surface_prop(struct ivisurface *ivisurf, ivisurf->on_layer = ivilayer; } } + + free(pArray); + pArray = NULL; } static void -- cgit v1.2.1