diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index bef5afeb5..2bb83b4ab 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -2651,8 +2651,7 @@ ide_board_close(int board) if (dev->type == IDE_ATAPI) dev->tf->atastat = DRDY_STAT | DSC_STAT; - - if ((dev->type == IDE_HDD) && (dev->tf != NULL)) { + else if (!(dev->type & IDE_SHADOW) && (dev->tf != NULL)) { free(dev->tf); dev->tf = NULL; }