diff options
author | Werner Koch <[email protected]> | 2000-01-24 11:55:49 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2000-01-24 11:55:49 +0000 |
commit | 0070faa0ffd5c366bc20f477a4838b701c20b063 (patch) | |
tree | 4fb8a63c5f2b7cb4b33a51247bdc8961caa89720 /g10/compress.c | |
parent | See ChangeLog: Fri Dec 31 14:06:56 CET 1999 Werner Koch (diff) | |
download | gnupg-0070faa0ffd5c366bc20f477a4838b701c20b063.tar.gz gnupg-0070faa0ffd5c366bc20f477a4838b701c20b063.zip |
See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner Koch
Diffstat (limited to 'g10/compress.c')
-rw-r--r-- | g10/compress.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/g10/compress.c b/g10/compress.c index 4862346ad..478da5684 100644 --- a/g10/compress.c +++ b/g10/compress.c @@ -28,7 +28,7 @@ #include <zlib.h> #include "util.h" -#include "memory.h" +#include <gcrypt.h> #include "packet.h" #include "filter.h" #include "options.h" @@ -63,7 +63,7 @@ init_compress( compress_filter_context_t *zfx, z_stream *zs ) } zfx->outbufsize = 8192; - zfx->outbuf = m_alloc( zfx->outbufsize ); + zfx->outbuf = gcry_xmalloc( zfx->outbufsize ); } static int @@ -121,7 +121,7 @@ init_uncompress( compress_filter_context_t *zfx, z_stream *zs ) } zfx->inbufsize = 2048; - zfx->inbuf = m_alloc( zfx->inbufsize ); + zfx->inbuf = gcry_xmalloc( zfx->inbufsize ); zs->avail_in = 0; } @@ -196,7 +196,7 @@ compress_filter( void *opaque, int control, if( control == IOBUFCTRL_UNDERFLOW ) { if( !zfx->status ) { - zs = zfx->opaque = m_alloc_clear( sizeof *zs ); + zs = zfx->opaque = gcry_xcalloc( 1, sizeof *zs ); init_uncompress( zfx, zs ); zfx->status = 1; } @@ -221,7 +221,7 @@ compress_filter( void *opaque, int control, pkt.pkt.compressed = &cd; if( build_packet( a, &pkt )) log_bug("build_packet(PKT_COMPRESSED) failed\n"); - zs = zfx->opaque = m_alloc_clear( sizeof *zs ); + zs = zfx->opaque = gcry_xcalloc( 1, sizeof *zs ); init_compress( zfx, zs ); zfx->status = 2; } @@ -233,18 +233,18 @@ compress_filter( void *opaque, int control, else if( control == IOBUFCTRL_FREE ) { if( zfx->status == 1 ) { inflateEnd(zs); - m_free(zs); + gcry_free(zs); zfx->opaque = NULL; - m_free(zfx->outbuf); zfx->outbuf = NULL; + gcry_free(zfx->outbuf); zfx->outbuf = NULL; } else if( zfx->status == 2 ) { zs->next_in = buf; zs->avail_in = 0; do_compress( zfx, zs, Z_FINISH, a ); deflateEnd(zs); - m_free(zs); + gcry_free(zs); zfx->opaque = NULL; - m_free(zfx->outbuf); zfx->outbuf = NULL; + gcry_free(zfx->outbuf); zfx->outbuf = NULL; } } else if( control == IOBUFCTRL_DESC ) |