aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-03 16:38:48 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-03 16:38:48 +0100
commit3e6f86dea7904a9bc7a21fa230d44a8a092968d6 (patch)
tree97bc5a886512b6197cf32a281051d5b8e47c0b33
parentdf193c40175529e2002b5e0661106ca4ca9f5aed (diff)
downloadrspamd-3e6f86dea7904a9bc7a21fa230d44a8a092968d6.tar.gz
rspamd-3e6f86dea7904a9bc7a21fa230d44a8a092968d6.zip
Fix crash in client.
-rw-r--r--src/client/rspamdclient.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/client/rspamdclient.c b/src/client/rspamdclient.c
index 484a82089..7f4e8aff5 100644
--- a/src/client/rspamdclient.c
+++ b/src/client/rspamdclient.c
@@ -98,7 +98,6 @@ rspamd_client_error_handler (struct rspamd_http_connection *conn, GError *err)
c = req->conn;
req->cb (c, NULL, c->server_name->str, NULL, req->input, req->ud, err);
- rspamd_client_request_free (req);
}
static gint
@@ -130,7 +129,7 @@ rspamd_client_finish_handler (struct rspamd_http_connection *conn,
msg->status ? msg->status->str : "unknown error");
req->cb (c, msg, c->server_name->str, NULL, req->input, req->ud, err);
g_error_free (err);
- rspamd_client_request_free (req);
+
return 0;
}
@@ -141,14 +140,13 @@ 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);
- rspamd_client_request_free (req);
+
return 0;
}
req->cb (c, msg, c->server_name->str, ucl_parser_get_object (
parser), req->input, req->ud, NULL);
ucl_parser_free (parser);
- rspamd_client_request_free (req);
}
return 0;
@@ -280,7 +278,7 @@ rspamd_client_destroy (struct rspamd_client_connection *conn)
if (conn != NULL) {
rspamd_http_connection_unref (conn->http_conn);
if (conn->req != NULL) {
- g_slice_free1 (sizeof (struct rspamd_client_request), conn->req);
+ rspamd_client_request_free (conn->req);
}
close (conn->fd);
if (conn->key) {