diff options
author | eadler <eadler@FreeBSD.org> | 2011-12-08 03:20:38 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2011-12-08 03:20:38 +0000 |
commit | bc26bd381f915f9505a32e761fff0599460922b7 (patch) | |
tree | dc6477c0a40a6bc6d87afc443d4ca7b4bead7002 /sys/kern | |
parent | a07fbf83e405db7f7aa6fdfa06c83ce015cac42f (diff) | |
download | FreeBSD-src-bc26bd381f915f9505a32e761fff0599460922b7.zip FreeBSD-src-bc26bd381f915f9505a32e761fff0599460922b7.tar.gz |
- Fix ktrace leakage if error is set
PR: kern/163098
Submitted by: Loganaden Velvindron <loganaden@devio.us>
Approved by: sbruno@
MFC after: 1 month
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_ktrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 3bb529f..120733e 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -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); } |