diff options
author | vivek <vivek.ellur@samsung.com> | 2014-05-15 18:58:16 +0530 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2014-06-24 10:22:43 -0700 |
commit | 31732f7c68c4c6c6619285fa23b253dbae2e986b (patch) | |
tree | 373ae030c6a4ff8b2e6a74201113ca4247b962d2 /clients/cliptest.c | |
parent | 1478ea54caea6620378e4383d84e0f67d8c4e299 (diff) | |
download | weston-31732f7c68c4c6c6619285fa23b253dbae2e986b.tar.gz |
Clients: Fix memleak issues in various clients of weston
In many clients of weston, Display was not being destroyed so added it.
Also destroy windows, widgets which were not being destroyed.
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Diffstat (limited to 'clients/cliptest.c')
-rw-r--r-- | clients/cliptest.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/clients/cliptest.c b/clients/cliptest.c index 3cee343f..a1928f40 100644 --- a/clients/cliptest.c +++ b/clients/cliptest.c @@ -879,6 +879,14 @@ benchmark(void) return 0; } +static void +cliptest_destroy(struct cliptest *cliptest) +{ + widget_destroy(cliptest->widget); + window_destroy(cliptest->window); + free(cliptest); +} + int main(int argc, char *argv[]) { @@ -897,9 +905,8 @@ main(int argc, char *argv[]) cliptest = cliptest_create(d); display_run(d); - widget_destroy(cliptest->widget); - window_destroy(cliptest->window); - free(cliptest); + cliptest_destroy(cliptest); + display_destroy(d); return 0; } |