coverity: Model g_memdup()