namedb: fixed leak, lmdb iteration