diff options
author | tobhe <tobhe@cvs.openbsd.org> | 2020-04-22 17:26:55 +0000 |
---|---|---|
committer | tobhe <tobhe@cvs.openbsd.org> | 2020-04-22 17:26:55 +0000 |
commit | 7e72335b18969ccd76170aead570b78c4acd98c8 (patch) | |
tree | 5927f476ad2105db0f7a7ad99ee8ef4488edf05f /sbin/iked/crypto.c | |
parent | b65362b52071b6bc6f4be8aa5f2918a86f51d192 (diff) |
Fix leaks in signature validation.
ok markus@
Diffstat (limited to 'sbin/iked/crypto.c')
-rw-r--r-- | sbin/iked/crypto.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/iked/crypto.c b/sbin/iked/crypto.c index 59429c5a378..d6f6ac51a1f 100644 --- a/sbin/iked/crypto.c +++ b/sbin/iked/crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.c,v 1.25 2020/04/20 20:03:38 tobhe Exp $ */ +/* $OpenBSD: crypto.c,v 1.26 2020/04/22 17:26:54 tobhe Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -652,6 +652,10 @@ dsa_setkey(struct iked_dsa *dsa, void *key, size_t keylen, uint8_t type) goto err; } + if (cert != NULL) + X509_free(cert); + BIO_free(rawcert); /* temporary for parsing */ + return (dsa->dsa_keydata); sslerr: |