diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index f86be197f..630d15620 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -2234,6 +2234,7 @@ sg_remove_sfp_usercontext(struct work_struct *work) SCSI_LOG_TIMEOUT(6, sg_printk(KERN_INFO, sdp, "sg_remove_sfp: sfp=0x%p\n", sfp)); kfree(sfp); + sfp = NULL; kref_put(&sdp->d_ref, sg_device_destroy); scsi_device_put(device);