Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jan 2012 20:52:01 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r230158 - stable/7/sys/kern
Message-ID:  <201201152052.q0FKq1TB099538@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler (ports committer)
Date: Sun Jan 15 20:52:01 2012
New Revision: 230158
URL: http://svn.freebsd.org/changeset/base/230158

Log:
  MFC r228343:
  	 - Fix ktrace leakage if error is set
  
  PR:		kern/163098
  Approved by:	sbruno

Modified:
  stable/7/sys/kern/kern_ktrace.c
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/kern/kern_ktrace.c
==============================================================================
--- stable/7/sys/kern/kern_ktrace.c	Sun Jan 15 20:43:39 2012	(r230157)
+++ stable/7/sys/kern/kern_ktrace.c	Sun Jan 15 20:52:01 2012	(r230158)
@@ -462,7 +462,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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201152052.q0FKq1TB099538>