bdilly pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=345fec274730ff8b14f41009fba89767d17f38fa
commit 345fec274730ff8b14f41009fba89767d17f38fa Author: Guilherme Iscaro <[email protected]> Date: Thu Dec 1 16:13:11 2016 -0200 Efl.Input: Properly unref the device if a new device is set. The old device must be unrefed, otherwise it will leak. --- src/lib/evas/canvas/efl_input_focus.c | 2 +- src/lib/evas/canvas/efl_input_hold.c | 2 +- src/lib/evas/canvas/efl_input_key.c | 2 +- src/lib/evas/canvas/efl_input_pointer.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/evas/canvas/efl_input_focus.c b/src/lib/evas/canvas/efl_input_focus.c index da2aba6..b76a836 100644 --- a/src/lib/evas/canvas/efl_input_focus.c +++ b/src/lib/evas/canvas/efl_input_focus.c @@ -83,7 +83,7 @@ _efl_input_focus_efl_input_event_device_set(Eo *obj EINA_UNUSED, Efl_Input_Focus_Data *pd, Efl_Input_Device *device) { - pd->device = efl_ref(device); + efl_replace(&pd->device, device); } EOLIAN static Efl_Input_Device * diff --git a/src/lib/evas/canvas/efl_input_hold.c b/src/lib/evas/canvas/efl_input_hold.c index 774af38..ac3dfbf 100644 --- a/src/lib/evas/canvas/efl_input_hold.c +++ b/src/lib/evas/canvas/efl_input_hold.c @@ -26,7 +26,7 @@ _efl_input_hold_hold_get(Eo *obj EINA_UNUSED, Efl_Input_Hold_Data *pd) EOLIAN static void _efl_input_hold_efl_input_event_device_set(Eo *obj EINA_UNUSED, Efl_Input_Hold_Data *pd, Efl_Input_Device *dev) { - pd->device = efl_ref(dev); + efl_replace(&pd->device, dev); } EOLIAN static Efl_Input_Device * diff --git a/src/lib/evas/canvas/efl_input_key.c b/src/lib/evas/canvas/efl_input_key.c index 869b559..984d82c 100644 --- a/src/lib/evas/canvas/efl_input_key.c +++ b/src/lib/evas/canvas/efl_input_key.c @@ -230,7 +230,7 @@ _efl_input_key_efl_input_event_event_flags_get(Eo *obj EINA_UNUSED, Efl_Input_Ke EOLIAN static void _efl_input_key_efl_input_event_device_set(Eo *obj EINA_UNUSED, Efl_Input_Key_Data *pd, Efl_Input_Device *dev) { - pd->device = efl_ref(dev); + efl_replace(&pd->device, dev); } EOLIAN static Efl_Input_Device * diff --git a/src/lib/evas/canvas/efl_input_pointer.c b/src/lib/evas/canvas/efl_input_pointer.c index 109906e..397beef 100644 --- a/src/lib/evas/canvas/efl_input_pointer.c +++ b/src/lib/evas/canvas/efl_input_pointer.c @@ -224,7 +224,7 @@ _efl_input_pointer_delta_get(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd, in EOLIAN static void _efl_input_pointer_efl_input_event_device_set(Eo *obj EINA_UNUSED, Efl_Input_Pointer_Data *pd, Efl_Input_Device *dev) { - pd->device = efl_ref(dev); + efl_replace(&pd->device, dev); } EOLIAN static Efl_Input_Device * --
