elm: elm_atspi_bridge: fix double free issue (WGID:81393)
authorShinwoo Kim <cinoo.kim@samsung.com>
Tue, 14 Nov 2017 13:38:42 +0000 (14:38 +0100)
committerJiyoun Park <jy0703.park@samsung.com>
Thu, 21 Dec 2017 07:40:38 +0000 (16:40 +0900)
@tizen_fix

original patch: af78b85ec4ee65272f31068732b9933f1f9f8054

Change-Id: I46386e4334f22e38ddac5d06e054f5763f178d33

src/lib/elementary/elm_atspi_bridge.c

index a333a2a..59299fc 100644 (file)
@@ -5153,7 +5153,10 @@ _plug_embedded_send(Eldbus_Connection *conn, Eo *proxy, const char *bus, const c
    if (!eldbus_message_arguments_append(msg, "s", obj_path))
      goto fail;
 
-   free(obj_path);
+   //TIZEN_ONLY(20171114) elm_atspi_bridge: fix double free issue (WGID:81393)
+   // free(obj_path);
+   ELM_SAFE_FREE(obj_path, free);
+   //
 
    if (!eldbus_connection_send(conn, msg, _embedded_reply_cb, proxy, 100))
      goto fail;
@@ -5163,7 +5166,10 @@ _plug_embedded_send(Eldbus_Connection *conn, Eo *proxy, const char *bus, const c
 fail:
    ERR("AT-SPI: Unable to send Embedded request.");
    if (msg) eldbus_message_unref(msg);
-   free(obj_path);
+   //TIZEN_ONLY(20171114) elm_atspi_bridge: fix double free issue (WGID:81393)
+   // free(obj_path);
+   ELM_SAFE_FREE(obj_path, free);
+   //
    efl_event_callback_call(proxy, ELM_ATSPI_PROXY_EVENT_DISCONNECTED, NULL);
 }