summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2011-05-06 02:05:42 +0000
committerDamien Miller <djm@cvs.openbsd.org>2011-05-06 02:05:42 +0000
commit8b4404186d79b4a10fa72c4da2a2441c6548afff (patch)
tree0a0d662ee9832b4fb62cb28cad0f9e866f8c2235 /usr.bin
parent81e78d0ffb34b000b9bd07e1dcf1ffd671cd48f2 (diff)
fix memory leak; bz#1849 ok dtucker@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sshconnect2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index c88a8ddd48c..75bc1905b1c 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/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.
@@ -1882,9 +1882,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 *