diff options
author | Daniel Juyung Seo <seojuyung2@gmail.com> | 2013-11-27 01:39:40 +0900 |
---|---|---|
committer | Daniel Juyung Seo <seojuyung2@gmail.com> | 2013-11-27 01:48:37 +0900 |
commit | 106960af59174657c5f8315166169bb15d37d175 (patch) | |
tree | 86a7623af1df640bf9f6757ed5930b233b7bfe41 | |
parent | 662d086837d681fa35100a3c0d9a9d0d608c1927 (diff) | |
download | efl-106960af59174657c5f8315166169bb15d37d175.tar.gz |
emotion emotion_test: free allocated data when the dependent object is
deleted.
This fixes coverity CID 1099709.
-rw-r--r-- | src/tests/emotion/emotion_test_main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/emotion/emotion_test_main.c b/src/tests/emotion/emotion_test_main.c index f1b4fed8ba..7fe801e0f2 100644 --- a/src/tests/emotion/emotion_test_main.c +++ b/src/tests/emotion/emotion_test_main.c @@ -331,6 +331,13 @@ bg_key_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_U } static void +_oe_free_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ + free(data); +} + +static void video_obj_time_changed(Evas_Object *obj, Evas_Object *edje) { double pos, len, scale; @@ -618,6 +625,7 @@ init_video_object(const char *module_filename, const char *filename) fd = calloc(1, sizeof(Frame_Data)); oe = edje_object_add(evas); + evas_object_event_callback_add(oe, EVAS_CALLBACK_FREE, _oe_free_cb, NULL); evas_object_data_set(oe, "frame_data", fd); if (reflex) edje_object_file_set(oe, theme_get(), "video_controller/reflex"); |