.
Created attachment 2529 free_and_realloc.patch fix
Thank you for the patch. The problem is a bit worse than that, as realloc, malloc and free are missmatched between their plain variant and their g_* variant. Rather than including stdlib.h, properly using the g_* variant everywhere is a cleaner solution.
*** This bug has been marked as a duplicate of bug 4984 ***