patch-2.4.20 linux-2.4.20/drivers/scsi/sr.c
Next file: linux-2.4.20/drivers/scsi/sr_ioctl.c
Previous file: linux-2.4.20/drivers/scsi/seagate.c
Back to the patch index
Back to the overall index
- Lines: 10
- Date:
Thu Nov 28 15:53:14 2002
- Orig file:
linux-2.4.19/drivers/scsi/sr.c
- Orig date:
Fri Aug 2 17:39:44 2002
diff -urN linux-2.4.19/drivers/scsi/sr.c linux-2.4.20/drivers/scsi/sr.c
@@ -347,7 +347,8 @@
}
if (old_sg) {
memcpy(sg + i, old_sg, SCpnt->use_sg * sizeof(struct scatterlist));
- memcpy(bbpnt + i, old_bbpnt, SCpnt->use_sg * sizeof(void *));
+ if (old_bbpnt)
+ memcpy(bbpnt + i, old_bbpnt, SCpnt->use_sg * sizeof(void *));
scsi_free(old_sg, (((SCpnt->use_sg * sizeof(struct scatterlist)) +
(SCpnt->use_sg * sizeof(void *))) + 511) & ~511);
} else {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)