git: 5291b294d323 - stable/13 - proc_get_binpath(): provide syntaxically correct value for unused NDINIT arg

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Sat, 06 Nov 2021 02:25:29 UTC
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=5291b294d3237eec5a4fb625b09db624b4abf7ba

commit 5291b294d3237eec5a4fb625b09db624b4abf7ba
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-11-04 00:53:21 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-11-06 02:12:32 +0000

    proc_get_binpath(): provide syntaxically correct value for unused NDINIT arg
    
    (cherry picked from commit 7ac82c96fe79a6a9dcf595ef4860ed75d3511414)
---
 sys/kern/kern_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index d11f651960c0..21af09265dd2 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -2276,7 +2276,7 @@ proc_get_binpath(struct proc *p, char *binname, char **retbuf,
 			 * which case we should not report old name.
 			 */
 			NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, *retbuf,
-			    req->td);
+			    curthread);
 			error = namei(&nd);
 			if (error == 0) {
 				if (nd.ni_vp == vp)