winpr/registry: Fixed double free

fixes #1479
Merge pull request #1480 from bmiklautz/issue/1479

winpr/registry: Fixed double free