summaryrefslogtreecommitdiff
path: root/ivi-shell
diff options
context:
space:
mode:
authorWataru Natsume <WATARU_NATSUME@xddp.denso.co.jp>2016-03-03 19:56:52 +0900
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-03-04 13:45:31 +0200
commit9d8b4414d72e27cad3dccb03049199193a080c6a (patch)
treed5dd104fa629243e4d01b2eea16b07b27b7f16c1 /ivi-shell
parent9c926fe9f5d57ffd9f20433cbe092e3b28cf48b5 (diff)
hmi-controller: fix leak of ivi surface list
get_surfaces_on_layer() allocates memory and stores the pointer to 'ivisurfs'. But it was not freed. Signed-off-by: Wataru Natsume <WATARU_NATSUME@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'ivi-shell')
-rw-r--r--ivi-shell/hmi-controller.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
index ace65551..6548ed7e 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -655,7 +655,7 @@ set_notification_configure_surface(struct ivi_layout_surface *ivisurf,
struct hmi_controller_layer *layer_link = NULL;
struct ivi_layout_layer *application_layer = NULL;
struct weston_surface *surface;
- struct ivi_layout_surface **ivisurfs;
+ struct ivi_layout_surface **ivisurfs = NULL;
int32_t length = 0;
int32_t i;
@@ -690,9 +690,12 @@ set_notification_configure_surface(struct ivi_layout_surface *ivisurf,
* commit_changes to apply source_rectangle.
*/
ivi_layout_interface->commit_changes();
+ free(ivisurfs);
return;
}
}
+ free(ivisurfs);
+ ivisurfs = NULL;
}
switch_mode(hmi_ctrl, hmi_ctrl->layout_mode);