android_pipe: fix breakage due to bad g_mallocs