summaryrefslogtreecommitdiffstats
path: root/sys/cam/scsi/scsi_all.c
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2012-06-06 17:04:56 +0000
committerken <ken@FreeBSD.org>2012-06-06 17:04:56 +0000
commit29d8fd1bc18df5a2b3610092b279a75cfcd90360 (patch)
treee405b52dd72d6f4e1586dea55474724cc6f59949 /sys/cam/scsi/scsi_all.c
parent764f69e52955a8ed18bbd3ee714ee69545bb1451 (diff)
downloadFreeBSD-src-29d8fd1bc18df5a2b3610092b279a75cfcd90360.zip
FreeBSD-src-29d8fd1bc18df5a2b3610092b279a75cfcd90360.tar.gz
Fix a memory leak in the kernel case in scsi_command_string().
Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com> MFC after: 3 days
Diffstat (limited to 'sys/cam/scsi/scsi_all.c')
-rw-r--r--sys/cam/scsi/scsi_all.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c
index 239e803..abfa879 100644
--- a/sys/cam/scsi/scsi_all.c
+++ b/sys/cam/scsi/scsi_all.c
@@ -3059,6 +3059,10 @@ scsi_command_string(struct cam_device *device, struct ccb_scsiio *csio,
sizeof(cdb_str)));
}
+#ifdef _KERNEL
+ xpt_free_ccb((union ccb *)cgd);
+#endif
+
return(0);
}
OpenPOWER on IntegriCloud