From 576cdf728bf56bc54b16d4a11bd5ba38ddf7e727 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mon, 30 Mar 2015 10:55:01 +0200 Subject: [PATCH] Fix memory leak from upstream --- openssh-6.7p1-coverity.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/openssh-6.7p1-coverity.patch b/openssh-6.7p1-coverity.patch index c7a7e04..67d0a0c 100644 --- a/openssh-6.7p1-coverity.patch +++ b/openssh-6.7p1-coverity.patch @@ -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