summaryrefslogtreecommitdiff
path: root/sshconnect2.c
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 /sshconnect2.c
parent58a77e2eac23f22708002e00a57af1b9cbec282f (diff)
downloadopenssh-git-78c40c321bd4168bb2a17230f242d6aea684692a.tar.gz
- djm@cvs.openbsd.org 2011/05/06 02:05:41
[sshconnect2.c] fix memory leak; bz#1849 ok dtucker@
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index 3cb9b101..673bf1a4 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.186 2010/11/29 23:45:51 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.187 2011/05/06 02:05:41 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1888,9 +1888,12 @@ authmethod_get(char *authlist)
authmethod_is_enabled(current)) {
debug3("authmethod_is_enabled %s", name);
debug("Next authentication method: %s", name);
+ xfree(name);
return current;
}
}
+ if (name != NULL)
+ xfree(name);
}
static char *