[ndctl PATCH 2/2] ndctl: fix various memory leaks reported by valgrind