summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHosang Kim <hosang12.kim@samsung.com>2015-06-17 14:49:40 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-06-17 15:59:19 +0200
commitfbcdeb2a485fedb983aa71115f66a71f5002ef4d (patch)
tree887dad1228169c070741a856868dabf5027f0dd2
parente2070f72819ee2c8094fc9863c2c435209398d3e (diff)
atspi_bridge: fix memory leak issue
Summary: Call eldbus_message_unref to free Eldbus_Message structure. And delete unused Eldbus_Message variable. CID-386474 CID-391869 CID-394549 Reviewers: raster, woohyun, CHAN, Hermet, seoz, lukasz.stanislawski, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D2690 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/elm_atspi_bridge.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/elm_atspi_bridge.c b/src/lib/elm_atspi_bridge.c
index 4bf667311..c7a6a155b 100644
--- a/src/lib/elm_atspi_bridge.c
+++ b/src/lib/elm_atspi_bridge.c
@@ -1291,7 +1291,10 @@ _text_character_extents_get(const Eldbus_Service_Interface *iface, const Eldbus_
1291 eo_do(obj, res = elm_interface_atspi_text_character_extents_get(offset, screen_coords, &rect)); 1291 eo_do(obj, res = elm_interface_atspi_text_character_extents_get(offset, screen_coords, &rect));
1292 1292
1293 if (!res) 1293 if (!res)
1294 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Unable to get character extents."); 1294 {
1295 eldbus_message_unref(ret);
1296 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Unable to get character extents.");
1297 }
1295 eldbus_message_arguments_append(ret, "iiii", rect.x, rect.y, rect.w, rect.h); 1298 eldbus_message_arguments_append(ret, "iiii", rect.x, rect.y, rect.w, rect.h);
1296 1299
1297 return ret; 1300 return ret;
@@ -1448,7 +1451,10 @@ _text_range_extents_get(const Eldbus_Service_Interface *iface, const Eldbus_Mess
1448 screen_coords = type == ATSPI_COORD_TYPE_SCREEN ? EINA_TRUE : EINA_FALSE; 1451 screen_coords = type == ATSPI_COORD_TYPE_SCREEN ? EINA_TRUE : EINA_FALSE;
1449 eo_do(obj, res = elm_interface_atspi_text_range_extents_get(screen_coords, start, end, &rect)); 1452 eo_do(obj, res = elm_interface_atspi_text_range_extents_get(screen_coords, start, end, &rect));
1450 if (!res) 1453 if (!res)
1451 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Can't get range extents."); 1454 {
1455 eldbus_message_unref(ret);
1456 return eldbus_message_error_new(msg, "org.freedesktop.DBus.Error.Failed", "Can't get range extents.");
1457 }
1452 1458
1453 eldbus_message_arguments_append(ret, "iiii", rect.x, rect.y, rect.w, rect.h); 1459 eldbus_message_arguments_append(ret, "iiii", rect.x, rect.y, rect.w, rect.h);
1454 1460
@@ -2871,7 +2877,6 @@ static Eina_Bool
2871_selection_signal_send(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc, void *event_info EINA_UNUSED) 2877_selection_signal_send(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc, void *event_info EINA_UNUSED)
2872{ 2878{
2873 const char *event_desc; 2879 const char *event_desc;
2874 Eldbus_Message *msg;
2875 Eldbus_Service_Interface *selection = data; 2880 Eldbus_Service_Interface *selection = data;
2876 2881
2877 enum _Atspi_Object_Signals type; 2882 enum _Atspi_Object_Signals type;
@@ -2892,9 +2897,6 @@ _selection_signal_send(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Descripti
2892 return EINA_FALSE; 2897 return EINA_FALSE;
2893 } 2898 }
2894 2899
2895 msg = eldbus_service_signal_new(selection, type);
2896 EINA_SAFETY_ON_NULL_RETURN_VAL(msg, EINA_FALSE);
2897
2898 _object_signal_send(selection, type, event_desc, 0, 0, "i", 0); 2900 _object_signal_send(selection, type, event_desc, 0, 0, "i", 0);
2899 2901
2900 return EINA_TRUE; 2902 return EINA_TRUE;