Fix possible null deref in sdb_ns