* eet_cipher: Fix memory leak.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 17 Apr 2009 14:00:31 +0000 (14:00 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 17 Apr 2009 14:00:31 +0000 (14:00 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@40135 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eet_cipher.c

index 1e1aba2..0532413 100644 (file)
@@ -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;