Fix memory leak from upstream
This commit is contained in:
parent
b8a0f7a5ea
commit
576cdf728b
@ -480,3 +480,25 @@ diff -up openssh-6.8p1/sshkey.c.coverity openssh-6.8p1/sshkey.c
|
||||
#include "match.h"
|
||||
|
||||
/* openssh private key file format */
|
||||
diff --git a/sshd.c b/sshd.c
|
||||
index 6ff8f6f..2f2fcf8 100644
|
||||
--- a/sshd.c
|
||||
+++ b/sshd.c
|
||||
@@ -1548,6 +1548,7 @@ main(int ac, char **av)
|
||||
int keytype;
|
||||
Authctxt *authctxt;
|
||||
struct connection_info *connection_info = get_connection_info(0, 0);
|
||||
+ char *addr = NULL;
|
||||
|
||||
#ifdef HAVE_SECUREWARE
|
||||
(void)set_auth_parameters(ac, av);
|
||||
@@ -2261,7 +2262,8 @@ main(int ac, char **av)
|
||||
/* Log the connection. */
|
||||
verbose("Connection from %s port %d on %s port %d",
|
||||
remote_ip, remote_port,
|
||||
- get_local_ipaddr(sock_in), get_local_port());
|
||||
+ (addr = get_local_ipaddr(sock_in)), get_local_port());
|
||||
+ free(addr);
|
||||
|
||||
/*
|
||||
* We don't want to listen forever unless the other side
|
||||
|
Loading…
Reference in New Issue
Block a user