Fix null deref in sdb_drain