From 9fcb55930150df023ae4a02612168a89a67c8aa5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 12 Feb 2020 09:41:11 +0100 Subject: [PATCH] pki: Fix memory leak of blob on error CID #1419377 Signed-off-by: Andreas Schneider Reviewed-by: Jakub Jelen --- src/pki.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pki.c b/src/pki.c index 5cbd0c06..a386b1f6 100644 --- a/src/pki.c +++ b/src/pki.c @@ -2293,6 +2293,7 @@ int ssh_pki_import_signature_blob(const ssh_string sig_blob, rc = ssh_buffer_unpack(buf, "bd", &flags, &counter); if (rc < 0) { SSH_BUFFER_FREE(buf); + SSH_STRING_FREE(blob); return SSH_ERROR; } }