aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorKenneth D. Merry <ken@FreeBSD.org>2012-06-06 17:04:56 +0000
committerKenneth D. Merry <ken@FreeBSD.org>2012-06-06 17:04:56 +0000
commitd36f5410dd1bd51431837ae7c920616dd8b444f5 (patch)
treee405b52dd72d6f4e1586dea55474724cc6f59949 /sys/cam
parent8124c91fde5a4bd21b959e993768c3ac19f335b4 (diff)
downloadsrc-d36f5410dd1bd51431837ae7c920616dd8b444f5.tar.gz
src-d36f5410dd1bd51431837ae7c920616dd8b444f5.zip
Fix a memory leak in the kernel case in scsi_command_string().
Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com> MFC after: 3 days
Notes
Notes: svn path=/head/; revision=236689
Diffstat (limited to 'sys/cam')
-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 239e803a7bfa..abfa879d95e5 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);
}