nwrap: Replace free() calls by SAFE_FREE macro where possible.

Signed-off-by: Robin Hack <hack.robin@gmail.com>