From: Jean-Philippe Andre Date: Thu, 28 Sep 2017 02:57:51 +0000 (+0900) Subject: tests: Fix leak of input event & devices X-Git-Tag: submit/sandbox/upgrade/efl120/20180319.053334~2460 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bed255fc4bbe1b30c960339e8dda2fc6e7925cd;p=platform%2Fupstream%2Fefl.git tests: Fix leak of input event & devices After the previous patch, the caller of efl_input_dup() clearly owns the reference on the returned object, which means she must absolutely delete or unref if manually. Note that the previous patch changed the bug from use of invalid eo pointer to leaking of objects. But the only way to support bindings with something like dup() is to ensure we give a ref to the caller, and thus the parent should be null. Note: eo_debug was used extensively to reach this point. --- diff --git a/src/bin/elementary/test_events.c b/src/bin/elementary/test_events.c index 124068c..36fa0a0 100644 --- a/src/bin/elementary/test_events.c +++ b/src/bin/elementary/test_events.c @@ -142,6 +142,11 @@ static void _win_del(void *data, const Efl_Event *ev EINA_UNUSED) { testdata *td = data; + efl_del(td->evdown); + efl_del(td->evup); + efl_del(td->evmove); + efl_del(td->evkeydown); + efl_del(td->evkeyup); free(td); }