From 7ba81b974ef45ac78620c1ec5140c81f84b6f06f Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Sun, 21 Jun 2009 22:09:19 +0200 Subject: Fixed a use-after-free in match_hashed_host() --- libssh/keyfiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c index d7f5761e..147719c5 100644 --- a/libssh/keyfiles.c +++ b/libssh/keyfiles.c @@ -1280,9 +1280,9 @@ static int match_hashed_host(SSH_SESSION *session, const char *host, leave_function(); return 0; } - SAFE_FREE(source); hash = base64_to_bin(b64hash); + SAFE_FREE(source); if (hash == NULL) { buffer_free(salt); leave_function(); -- cgit v1.2.3