diff options
author | Simon L. B. Nielsen <simon@FreeBSD.org> | 2010-02-28 18:49:43 +0000 |
---|---|---|
committer | Simon L. B. Nielsen <simon@FreeBSD.org> | 2010-02-28 18:49:43 +0000 |
commit | f7a1b4761cf3f798e1b42d703d38221b47ce1eec (patch) | |
tree | 21770f10e7f26d05fc9b0fa96a7b6d7b107552c5 /crypto/comp | |
parent | f0c2a617dfb432d01bc5a716eb18dae12e6b45e3 (diff) | |
download | src-f7a1b4761cf3f798e1b42d703d38221b47ce1eec.tar.gz src-f7a1b4761cf3f798e1b42d703d38221b47ce1eec.zip |
Import OpenSSL 0.9.8m.vendor/openssl/0.9.8m
Notes
Notes:
svn path=/vendor-crypto/openssl/dist/; revision=204477
svn path=/vendor-crypto/openssl/0.9.8m/; revision=204478; tag=vendor/openssl/0.9.8m
Diffstat (limited to 'crypto/comp')
-rw-r--r-- | crypto/comp/c_zlib.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/crypto/comp/c_zlib.c b/crypto/comp/c_zlib.c index eccfd0913786..8df7792c50b7 100644 --- a/crypto/comp/c_zlib.c +++ b/crypto/comp/c_zlib.c @@ -136,15 +136,6 @@ struct zlib_state static int zlib_stateful_ex_idx = -1; -static void zlib_stateful_free_ex_data(void *obj, void *item, - CRYPTO_EX_DATA *ad, int ind,long argl, void *argp) - { - struct zlib_state *state = (struct zlib_state *)item; - inflateEnd(&state->istream); - deflateEnd(&state->ostream); - OPENSSL_free(state); - } - static int zlib_stateful_init(COMP_CTX *ctx) { int err; @@ -188,6 +179,12 @@ static int zlib_stateful_init(COMP_CTX *ctx) static void zlib_stateful_finish(COMP_CTX *ctx) { + struct zlib_state *state = + (struct zlib_state *)CRYPTO_get_ex_data(&ctx->ex_data, + zlib_stateful_ex_idx); + inflateEnd(&state->istream); + deflateEnd(&state->ostream); + OPENSSL_free(state); CRYPTO_free_ex_data(CRYPTO_EX_INDEX_COMP,ctx,&ctx->ex_data); } @@ -402,7 +399,7 @@ COMP_METHOD *COMP_zlib(void) if (zlib_stateful_ex_idx == -1) zlib_stateful_ex_idx = CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_COMP, - 0,NULL,NULL,NULL,zlib_stateful_free_ex_data); + 0,NULL,NULL,NULL,NULL); CRYPTO_w_unlock(CRYPTO_LOCK_COMP); if (zlib_stateful_ex_idx == -1) goto err; |