winpr/registry: Fixed double free

fixes #1479