[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] pki_gcrypt: Fix memory leak.
[Thread Prev] | [Thread Next]
- Subject: [PATCH 1/2] pki_gcrypt: Fix memory leak.
- From: Justus Winter <justus@xxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Wed, 9 Nov 2016 16:34:14 +0100
- To: libssh@xxxxxxxxxx
- Cc: Justus Winter <justus@xxxxxxxxxxx>
* src/pki_gcrypt.c (pki_key_ecdsa_to_nid): Release 'sexp'. Signed-off-by: Justus Winter <justus@xxxxxxxxxxx> --- src/pki_gcrypt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c index e3ae06d..025ff1b 100644 --- a/src/pki_gcrypt.c +++ b/src/pki_gcrypt.c @@ -701,20 +701,24 @@ static int pki_key_ecdsa_to_nid(gcry_sexp_t k) cmp = memcmp("NIST P-256", tmp, size); if (cmp == 0) { + gcry_sexp_release(sexp); return NID_gcrypt_nistp256; } cmp = memcmp("NIST P-384", tmp, size); if (cmp == 0) { + gcry_sexp_release(sexp); return NID_gcrypt_nistp384; } cmp = memcmp("NIST P-521", tmp, size); if (cmp == 0) { + gcry_sexp_release(sexp); return NID_gcrypt_nistp521; } } + gcry_sexp_release(sexp); return -1; } -- 2.10.2
[PATCH 2/2] pki_gcrypt: Fix freeing of ECDSA signatures. | Justus Winter <justus@xxxxxxxxxxx> |
Re: [PATCH 1/2] pki_gcrypt: Fix memory leak. | Andreas Schneider <asn@xxxxxxxxxxxxxx> |
Re: Build libssh against gcrypt | Andreas Schneider <asn@xxxxxxxxxxxxxx> |