pw: Fix a resource leak.
Reported by: Coverity MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc.