summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-05-15 08:36:59 +1000
committerDamien Miller <djm@mindrot.org>2011-05-15 08:36:59 +1000
commit78c40c321bd4168bb2a17230f242d6aea684692a (patch)
tree1cc1f7b93c6c566787ecbad89221afbc65d2a011
parent58a77e2eac23f22708002e00a57af1b9cbec282f (diff)
- djm@cvs.openbsd.org 2011/05/06 02:05:41
[sshconnect2.c] fix memory leak; bz#1849 ok dtucker@
-rw-r--r--ChangeLog3
-rw-r--r--sshconnect2.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 440b06e54..8541eb33a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@
11 [sftp.1] 11 [sftp.1]
12 mention that IPv6 addresses must be enclosed in square brackets; 12 mention that IPv6 addresses must be enclosed in square brackets;
13 bz#1845 13 bz#1845
14 - djm@cvs.openbsd.org 2011/05/06 02:05:41
15 [sshconnect2.c]
16 fix memory leak; bz#1849 ok dtucker@
14 17
1520110510 1820110510
16 - (dtucker) [openbsd-compat/openssl-compat.{c,h}] Bug #1882: fix 19 - (dtucker) [openbsd-compat/openssl-compat.{c,h}] Bug #1882: fix
diff --git a/sshconnect2.c b/sshconnect2.c
index 3cb9b101c..673bf1a4f 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.186 2010/11/29 23:45:51 djm Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.187 2011/05/06 02:05:41 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1888,9 +1888,12 @@ authmethod_get(char *authlist)
1888 authmethod_is_enabled(current)) { 1888 authmethod_is_enabled(current)) {
1889 debug3("authmethod_is_enabled %s", name); 1889 debug3("authmethod_is_enabled %s", name);
1890 debug("Next authentication method: %s", name); 1890 debug("Next authentication method: %s", name);
1891 xfree(name);
1891 return current; 1892 return current;
1892 } 1893 }
1893 } 1894 }
1895 if (name != NULL)
1896 xfree(name);
1894} 1897}
1895 1898
1896static char * 1899static char *