ptserver: Use correct structure type in malloc