From 8cdbd61b150617c314e176cf7466faedf9fe8b90 Mon Sep 17 00:00:00 2001 From: caro Date: Fri, 4 Sep 2009 05:03:47 +0000 Subject: [PATCH] et_init should fail if eina_init fails git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eet@42237 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eet_lib.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/lib/eet_lib.c b/src/lib/eet_lib.c index 52fdeb3..d4ff121 100644 --- a/src/lib/eet_lib.c +++ b/src/lib/eet_lib.c @@ -756,7 +756,17 @@ eet_init(void) OpenSSL_add_all_algorithms(); #endif - eina_init(); + if (!eina_init()) + { +#ifdef HAVE_GNUTLS + gnutls_global_deinit(); +#endif +#ifdef HAVE_OPENSSL + EVP_cleanup(); + ERR_free_strings(); +#endif + return 0; + } return eet_initcount; } @@ -769,6 +779,8 @@ eet_shutdown(void) if (eet_initcount > 0) return eet_initcount; eet_clearcache(); + + eina_shutdown(); #ifdef HAVE_GNUTLS gnutls_global_deinit(); #endif @@ -777,8 +789,6 @@ eet_shutdown(void) ERR_free_strings(); #endif - eina_shutdown(); - return eet_initcount; } -- 2.7.4