From 1ad8971a15db6a771c400fbcbdb19b5c8316573b Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 17 Apr 2009 14:00:31 +0000 Subject: [PATCH] * eet_cipher: Fix memory leak. SVN revision: 40135 --- legacy/eet/src/lib/eet_cipher.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/legacy/eet/src/lib/eet_cipher.c b/legacy/eet/src/lib/eet_cipher.c index 1e1aba2420..0532413719 100644 --- a/legacy/eet/src/lib/eet_cipher.c +++ b/legacy/eet/src/lib/eet_cipher.c @@ -99,6 +99,8 @@ eet_identity_open(const char *certificate_file, const char *private_key_file, Ee /* Init */ if (!(key = malloc(sizeof(Eet_Key)))) goto on_error; + key->references = 1; + if (gnutls_x509_crt_init(&(key->certificate))) goto on_error; if (gnutls_x509_privkey_init(&(key->private_key))) goto on_error; @@ -604,6 +606,7 @@ eet_identity_check(const void *data_base, unsigned int data_length, *sha1_length = -1; } # endif + gnutls_x509_crt_deinit(cert); # else const unsigned char *tmp;