fix segmentation fault in test basic-19, in which the storage is closed and channels based on it remain open.