From: billh Date: Mon, 31 Jul 2006 22:32:03 +0000 (+0000) Subject: Important fix (bug 337239) from Alexander Larssen. Thanks Alex! X-Git-Tag: AT_SPI2_CORE_0_1_3~425 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf567bd67bd03ad0a19ae0dedb6dc0af4d8bc79a;p=platform%2Fupstream%2Fat-spi2-core.git Important fix (bug 337239) from Alexander Larssen. Thanks Alex! A CORBA_free call was fixed, and also the initialization of a CORBA_Any was fixed (both fixes were necessary to prevent big trouble on 64-bit, and the bug is a likely candidate for trouble on other archs. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@848 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/ChangeLog b/ChangeLog index 4a8fa80..5095a2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2006-07-31 Bill Haneman + + * atk-bridge/bridge.c: + (spi_atk_emit_eventv): Fix the CORBA_free call which was + causing 64-bit troubles and memory leaks. + Special thanks to Alexander Larsson who finally seems to + have tracked down the problem, not just here but in + libspi/util.c... + + * libspi/util.c: + (spi_init_any_object): Make sure we copy the CORBA value + when initializing an object for passing as a CORBA_Any. + Bug #337239. + 2006-07-21 Bill Haneman * idl/Accessibility.idl: diff --git a/atk-bridge/bridge.c b/atk-bridge/bridge.c index b02cc4f..c7606cb 100644 --- a/atk-bridge/bridge.c +++ b/atk-bridge/bridge.c @@ -696,7 +696,7 @@ spi_atk_emit_eventv (const GObject *gobject, g_free (e.type); - if (e.any_data._release) CORBA_free (&e.any_data._value); + if (!any && e.any_data._release) CORBA_free (e.any_data._value); va_end (args); diff --git a/libspi/util.c b/libspi/util.c index 1a6c5c4..5c77669 100644 --- a/libspi/util.c +++ b/libspi/util.c @@ -153,7 +153,7 @@ spi_init_any_object (CORBA_any *any_details, Accessibility_Application app, details->source_name = CORBA_string_dup (name); details->any_data._type = TC_CORBA_Object; - details->any_data._value = o; + details->any_data._value = ORBit_copy_value (o, TC_CORBA_Object); details->any_data._release = TRUE; }