Replace g_malloc with GEDA_MEM_ALLOC