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
This commit is contained in:
Konstantin Belousov 2021-11-03 17:11:33 +02:00
parent c75c1d2df9
commit 02de91d740

View File

@ -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);
}