util/compatfd.c: Replaced a malloc call with g_malloc.