Module Name:    src
Committed By:   kamil
Date:           Sun Sep 15 15:27:50 UTC 2019

Modified Files:
        src/bin/ps: ps.c

Log Message:
ps(1): Guard freeing the memory of pinfo with __NO_LEAKS.

No more leaks are detected by LSan/NetBSD as of the LLVM snapshot
(clang10svn) from 2019-09-15.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/bin/ps/ps.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ps/ps.c
diff -u src/bin/ps/ps.c:1.92 src/bin/ps/ps.c:1.93
--- src/bin/ps/ps.c:1.92	Wed Sep 11 17:02:53 2019
+++ src/bin/ps/ps.c	Sun Sep 15 15:27:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ps.c,v 1.92 2019/09/11 17:02:53 kamil Exp $	*/
+/*	$NetBSD: ps.c,v 1.93 2019/09/15 15:27:50 kamil Exp $	*/
 
 /*
  * Copyright (c) 2000-2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 19
 #if 0
 static char sccsid[] = "@(#)ps.c	8.4 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: ps.c,v 1.92 2019/09/11 17:02:53 kamil Exp $");
+__RCSID("$NetBSD: ps.c,v 1.93 2019/09/15 15:27:50 kamil Exp $");
 #endif
 #endif /* not lint */
 
@@ -526,7 +526,9 @@ main(int argc, char *argv[])
 		}
 	}
 
+#ifdef __NO_LEAKS
 	free(pinfo);
+#endif
 
 	return eval;
 }

Reply via email to