Fix memory leaks on db_error by removing hard exit.