Date: Wed, 3 Nov 2021 15:30:48 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 02de91d74023 - main - proc_get_binpath(): return empty string instead of NULL Message-ID: <202111031530.1A3FUmUp037456@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=02de91d740235f186321d7d3e11d09737daba43e commit 02de91d740235f186321d7d3e11d09737daba43e Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-11-03 15:11:33 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-11-03 15:30:10 +0000 proc_get_binpath(): return empty string instead of NULL for strange case where queried process does not have text. Reported by: Michael Butler <imb@protected-networks.net> Sponsored by: The FreeBSD Foundation MFC after: 3 days --- 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 2156c5c465ba..d11f651960c0 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2252,7 +2252,7 @@ proc_get_binpath(struct proc *p, char *binname, char **retbuf, vp = p->p_textvp; if (vp == NULL) { PROC_UNLOCK(p); - *retbuf = NULL; + *retbuf = ""; *freebuf = NULL; return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111031530.1A3FUmUp037456>