[Gnucash-changes] Eliminate a double free of memory.
warlord at MIT.EDU
Thu Jun 2 17:33:16 EDT 2005
Quoting David Hampton <hampton-gnucash at rainbolthampton.net>:
> I think this will work because gtk_widget_destroy correctly handles
> recursive invocation. If the widget is already in the process of being
> destroyed then the call to gtk_widget_destroy from
> gnc_customer_window_close_handler is a noop, otherwise it will actually
> destroy the dialog.
What if the gtk_widget_destroy() finishes and returns before the CM callback
happens? For example, if the CM events are suspended, the CM system will cache
the event and then return, causing gtk_widget_destroy() to finish. Then later
when the events are resumed it will call the CM callback which will call
gtk_widget_destroy() on the already-freed widget. Wouldn't that be a problem?
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel