Fix a place where we were referencing a pointer after it had been freed.

Submitted by:	"Henry Miller" <hank@blackhole.com>
MFC after:	3 days
This commit is contained in:
Kenneth D. Merry 2005-03-26 04:21:11 +00:00
parent 6c6faad6dd
commit b3b73720f2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144132

View File

@ -1157,6 +1157,8 @@ chgetelemstatus(struct cam_periph *periph,
* Fill in the user status array.
*/
st_hdr = (struct read_element_status_header *)data;
pg_hdr = (struct read_element_status_page_header *)((uintptr_t)st_hdr +
sizeof(struct read_element_status_header));
avail = scsi_2btoul(st_hdr->count);
if (avail != cesr->cesr_element_count) {