g_free() should be used for g_malloc().