ptserver: move allocation out of put_prentries() into listEntries()