From af9465695537e439312031a5e6acf15621de1c50 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sat, 5 Jan 2013 12:14:41 +0000 Subject: [PATCH] Evas smart clipped: Potentially fix memory leak as reported by raster. Not really properly tested, sorry for that. SVN revision: 82271 --- src/lib/evas/canvas/evas_object_smart_clipped.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_smart_clipped.c b/src/lib/evas/canvas/evas_object_smart_clipped.c index fd8ebc0b10..677731bea1 100644 --- a/src/lib/evas/canvas/evas_object_smart_clipped.c +++ b/src/lib/evas/canvas/evas_object_smart_clipped.c @@ -110,11 +110,10 @@ evas_object_smart_clipped_smart_del(Evas_Object *eo_obj) _evas_object_smart_members_all_del(eo_obj); -// BIG BIG BIG WARNING! withint this cso - anyone using the smart_clipped -// interface is leaking unless they are using eo! this here is an abi break! -// we NEED this free back, but there is a lot of surgery to do to make it -// able to go back in! mailing list discussion! -// free(cso); + /* If it's a legacy smart object, we should free the cso. */ + if (!eo_isa(eo_obj, MY_CLASS)) + free(cso); + evas_object_smart_data_set(eo_obj, NULL); }