[atspi][proxy] assign NULL after eina_stringshare_del is called.
authorShinwoo Kim <cinoo.kim@samsung.com>
Wed, 7 Dec 2016 11:38:26 +0000 (20:38 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 05:37:05 +0000 (14:37 +0900)
commit4c77fc977635bdc477e42cca2a0a262c6d998ebc
tree0118da92e5f2c85044f2b8a21b52189f88cbf5c5
parent8f259edc301a57b10ef3953c3957b8656fe508bd
[atspi][proxy] assign NULL after eina_stringshare_del is called.

The _pd->path, _pd->bus could be accessed when the proxy is deleted to send signal of ATSPI_OBJECT_CHILD_REMOVED.
See the following backtrace:

0  0xb67b1c04 in raise () from /lib/libc.so.6
1  0xb67b2f98 in abort () from /lib/libc.so.6
2  0xb40bf258 in _dbus_abort () at dbus-sysdeps.c:91
3  0xb40b87be in _dbus_warn_check_failed (
   format=0xb40c5080 "arguments to %s() were incorrect, assertion \"%s\" failed in file %s line %d.\nThis is normally a bug in some application using the D-Bus library.\n") at dbus-internals.c:275
4  0xb40ae8dc in dbus_message_iter_append_basic (iter=<optimized out>,
   type=111, value=0x1, value@entry=0xbee78bc0) at dbus-message.c:2865
5  0xb61d194a in append_basic (type=type@entry=12 '\f', vl=0xbee78bec,
   vl@entry=0xbee78bd4, iter=iter@entry=0xb8728db0)
   at lib/eldbus/eldbus_message.c:449
6  0xb61d323e in eldbus_message_iter_basic_append (
   iter=iter@entry=0xb8728da0, type=111) at lib/eldbus/eldbus_message.c:566
7  0xb6d2792c in _bridge_iter_object_reference_append (
   bridge=bridge@entry=0x8000341b, iter=0xb837de90, obj=obj@entry=0x80100e0c)
   at elm_atspi_bridge.c:3233
8  0xb6d27a32 in _on_object_del (data=0x8000341b, obj=0x80100e0c,
   event=<optimized out>, event_info=<optimized out>)
   at elm_atspi_bridge.c:4480
9  0xb6d26e0c in _bridge_accessible_event_dispatch (data=0x8000341b,
   accessible=0x80100e0c,
   desc=0xb6e7c0f4 <_ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_REMOVED>,
--Type <return> to continue, or q <return> to quit---
   event_info=0x0) at elm_atspi_bridge.c:4660
10 0xb6d94778 in _elm_interface_atspi_accessible_event_emit (
   class=<optimized out>, pd=<optimized out>, accessible=0x80100e0c,
   event=0xb6e7c0f4 <_ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_REMOVED>,
   event_info=0x0) at elm_interface_atspi_accessible.c:486
11 0xb6d9407c in elm_interface_atspi_accessible_event_emit (
   accessible=accessible@entry=0x80100e0c,
   event=0xb6e7c0f4 <_ELM_INTERFACE_ATSPI_ACCESSIBLE_EVENT_REMOVED>,
   event_info=event_info@entry=0x0) at elm_interface_atspi_accessible.eo.c:124
12 0xb6e0f918 in _elm_widget_eo_base_destructor (obj=0x80100e0c,
   sd=0xb87504b0) at elm_widget.c:6101
13 0xb6716108 in eo_destructor () at lib/eo/eo_base.eo.c:34
14 0xb6d254d6 in _elm_atspi_proxy_eo_base_destructor (obj=0x80100e0c,
    _pd=<optimized out>) at elm_atspi_proxy.c:88

Change-Id: Iad77033d7ba6e85799bcc17bd09efa29d5c85440
src/lib/elm_atspi_bridge.c
src/lib/elm_atspi_proxy.c