From 2395e17750aa96d37fbf45b355fbc9fcbf6f2491 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 18 Jul 2016 17:51:08 +0100 Subject: [PATCH] [Minor] Use refcounts for http messages --- src/controller.c | 2 +- src/lua/lua_http.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller.c b/src/controller.c index 1144441fd..5662409d6 100644 --- a/src/controller.c +++ b/src/controller.c @@ -925,7 +925,7 @@ rspamd_controller_handle_get_map (struct rspamd_http_connection_entry *conn_ent, if (!rspamd_http_message_set_body_from_fd (reply, fd)) { close (fd); - rspamd_http_message_free (reply); + rspamd_http_message_unref (reply); msg_err_session ("cannot read map %s: %s", bk->uri, strerror (errno)); rspamd_controller_send_error (conn_ent, 500, "500 map read error"); return 0; diff --git a/src/lua/lua_http.c b/src/lua/lua_http.c index 0c4eb976d..a63a7e489 100644 --- a/src/lua/lua_http.c +++ b/src/lua/lua_http.c @@ -96,7 +96,7 @@ lua_http_fin (gpointer arg) } else if (cbd->msg != NULL) { /* We need to free message */ - rspamd_http_message_free (cbd->msg); + rspamd_http_message_unref (cbd->msg); } if (cbd->fd != -1) { -- 2.39.5