Hi

Tiny diff to save an allocation.

Best,

Martin

Index: monitor.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/monitor.c,v
retrieving revision 1.231
diff -u -p -r1.231 monitor.c
--- monitor.c   28 Jan 2022 06:18:42 -0000      1.231
+++ monitor.c   23 Feb 2022 16:49:27 -0000
@@ -658,9 +658,8 @@ mm_answer_pwnamallow(struct ssh *ssh, in
 
        pwent = getpwnamallow(ssh, username);
 
-       authctxt->user = xstrdup(username);
+       authctxt->user = username;
        setproctitle("%s [priv]", pwent ? username : "unknown");
-       free(username);
 
        sshbuf_reset(m);
 

Reply via email to