- Fix ktrace leakage if error is set

PR:		kern/163098
Submitted by:	Loganaden Velvindron <loganaden@devio.us>
Approved by:	sbruno@
MFC after:	1 month
This commit is contained in:
Eitan Adler 2011-12-08 03:20:38 +00:00
parent b5828c5723
commit 5a01b72672

@ -478,7 +478,7 @@ ktrsysret(code, error, retval)
ktp = &req->ktr_data.ktr_sysret;
ktp->ktr_code = code;
ktp->ktr_error = error;
ktp->ktr_retval = retval; /* what about val2 ? */
ktp->ktr_retval = ((error == 0) ? retval: 0); /* what about val2 ? */
ktr_submitrequest(curthread, req);
}