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

Signed-off-by: Robin Hack <hack.robin@gmail.com>
nwrap: Prevent compilation failure on machine without IPv4.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
nwrap: Simplify file loading.

Use standard libc functions to cut file to lines.

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