Memory leak fix.

The `it' variable was never free'd on error path using `continue'.
Interestingly enough, a codepath handling ENOMEM is a few lines below.
Fix Dead assignments reported by scan-build.
Fix a set-but-not-read error detected by scan-build
Merge branch 'scan-build' of github.com:kAworu/pkgng into scan-build