Clear the data buffer length field when freeing a command structure so that

it doesn't leak through when the command structure is reused for a user
command without a data buffer.

PR:		amd64/189668
Tested by:	Pete Long <pete@nrth.org>
MFC after:	1 week
This commit is contained in:
John Baldwin 2014-05-17 02:45:04 +00:00
parent 6b14aaa4d4
commit b2b39b0478
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=266281

View File

@ -1408,6 +1408,7 @@ aac_release_command(struct aac_command *cm)
fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "");
/* (re)initialize the command/FIB */
cm->cm_datalen = 0;
cm->cm_sgtable = NULL;
cm->cm_flags = 0;
cm->cm_complete = NULL;