issue30_MarkFreedPointer2NULL

Hi Klaus,
This commit was done based on the issue: https://github.com/Openwsman/openwsman/issues/30
The discussion for the same at: https://github.com/Openwsman/openwsman/pull/31

kindly review the changes and suggest for modifications.