Fix memory leak from upstream

This commit is contained in:
Jakub Jelen 2015-03-30 10:55:01 +02:00
parent b8a0f7a5ea
commit 576cdf728b
1 changed files with 22 additions and 0 deletions

View File

@ -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