[OTR-dev] memory leak in pidgin-otr

Ian Goldberg ian at cypherpunks.ca
Tue Jan 29 14:23:14 EST 2013


On Mon, Jan 28, 2013 at 11:24:18PM +0100, Andreas Schlick wrote:
> Hello!
> 
> > Ian and I were both curious about how this didn't cause a crash on
> > Windows. I suspect it is because free() and g_free() somehow behave
> > differently?
> 
> Why should it crash specifically on Windows? AFAICT, glib's memory
> functions come down to standard {m,c,re}alloc()/free() and so using
> free() instead of g_free() should work (at least for the moment).
> I also didn't spot any #ifdef's for windows in glib/gmem.{c,h} or is 
> somehow g_mem_set_vtable() called on Windows?

Sorry, my mistake.  I was under the impression that GTK's memory
functions managed their own allocations on Windows, but it seems I was
mistaken (unless it's compiled with certain options, but that's not
Windows specific).  So that explains the lack of crashing, at least.
;-)

Thanks,

   - Ian



More information about the OTR-dev mailing list