Re: [gtk-vnc-devel] [PATCH] Fix vnc_display_open followed by immediate vnc_display_close



On Thu, Jan 10, 2008 at 05:33:57PM +0000, Richard W.M. Jones wrote:
> If you call one of the vnc_display_open* functions followed quickly by 
> vnc_display_close, then the library segfaults.
> 
> The reason is that the vnc_display_open* functions register an idle 
> callback to launch the coroutine, but if vnc_display_close is called 
> before the idle loop has had a moment to run, this idle callback 
> remains.  The coroutine later runs - in my case, after the plugin I'm 
> writing has been unmapped from memory, with unhappy consequences.
> 
> The attached patch fixes this by remembering the callback ID and 
> unregistering it if necessary.

ACK, looks good to me.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]