#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <assert.h>
#include <errno.h>
#ifdef HAVE_ZIP
# include <zlib.h>
zfx->release (zfx);
}
else if( control == IOBUFCTRL_DESC )
- *(char**)buf = "compress_filter";
+ mem2str (buf, "compress_filter", *ret_len);
return rc;
}
#endif /*HAVE_ZIP*/
static void
release_context (compress_filter_context_t *ctx)
{
+ xfree(ctx->inbuf);
+ ctx->inbuf = NULL;
+ xfree(ctx->outbuf);
+ ctx->outbuf = NULL;
xfree (ctx);
}
int rc;
if(check_compress_algo(cd->algorithm))
- return G10ERR_COMPR_ALGO;
+ return GPG_ERR_COMPR_ALGO;
cfx = xmalloc_clear (sizeof *cfx);
cfx->release = release_context;
cfx->algo = cd->algorithm;