aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/ikev2/ikev2_crypto.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-09-17 17:08:07 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-09-28 17:08:47 +0000
commita8af7cf253c4e8ab9ba1a2cfed50f6236fea3a62 (patch)
tree15558e23d32f453bd016256b9c6fbccc80826f41 /src/plugins/ikev2/ikev2_crypto.c
parente347acbc31111504c015531e8ad764a86d489309 (diff)
ikev2: fix memory leaks
Type: fix Change-Id: I5be19a4923b37e2636621d36155178ac348ee41c Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/ikev2/ikev2_crypto.c')
-rw-r--r--src/plugins/ikev2/ikev2_crypto.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/ikev2/ikev2_crypto.c b/src/plugins/ikev2/ikev2_crypto.c
index b1fdf890e08..013857dee9b 100644
--- a/src/plugins/ikev2/ikev2_crypto.c
+++ b/src/plugins/ikev2/ikev2_crypto.c
@@ -828,6 +828,7 @@ ikev2_load_cert_file (u8 * file)
}
pkey = X509_get_pubkey (x509);
+ X509_free (x509);
if (pkey == NULL)
ikev2_log_error ("get pubkey %s failed", file);