aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-26 11:02:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-26 11:02:33 +0100
commit443971e6d041b5da46a5c2c3a33fc0eb8bbc82a9 (patch)
treeabacea584962cc4ba3838267809f4f4ba99758f0 /src/client
parentaa4e6f0e09a45d0e82be4d495e97a7c9eb7342a8 (diff)
downloadrspamd-443971e6d041b5da46a5c2c3a33fc0eb8bbc82a9.tar.gz
rspamd-443971e6d041b5da46a5c2c3a33fc0eb8bbc82a9.zip
[Fix] Fix memory leak in client when using compression
Diffstat (limited to 'src/client')
-rw-r--r--src/client/rspamdclient.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c
index e71d5d3e0..d0b315108 100644
--- a/src/client/rspamdclient.c
+++ b/src/client/rspamdclient.c
@@ -193,12 +193,12 @@ rspamd_client_finish_handler (struct rspamd_http_connection *conn,
ucl_parser_free (parser);
req->cb (c, msg, c->server_name->str, NULL, req->input, req->ud, err);
g_error_free (err);
- g_free (out);
+ g_free (zout.dst);
return 0;
}
- g_free (out);
+ g_free (zout.dst);
}
else {
err = g_error_new (RCLIENT_ERROR, 500,
@@ -386,6 +386,7 @@ rspamd_client_command (struct rspamd_client_connection *conn,
g_slice_free1 (sizeof (struct rspamd_client_request), req);
g_string_free (input, TRUE);
rspamd_fstring_free (body);
+ ZSTD_freeCCtx (zctx);
return FALSE;
}
@@ -393,6 +394,7 @@ rspamd_client_command (struct rspamd_client_connection *conn,
rspamd_http_message_set_body_from_fstring_steal (req->msg, body);
req->input = input;
+ ZSTD_freeCCtx (zctx);
}
else {
req->input = NULL;