summaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-05 18:20:22 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-05 18:20:22 +0000
commit1e08514471896e3b3069cdc25f457036d257cc68 (patch)
treeb591aa5d3eac5fec70d137d664ccc4b95db63cc4 /src/controller.c
parent9068c5040e2737ce70f0cc9498000efa30c14c74 (diff)
downloadrspamd-1e08514471896e3b3069cdc25f457036d257cc68.tar.gz
rspamd-1e08514471896e3b3069cdc25f457036d257cc68.zip
Fix potential issues as found by coverity.
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/controller.c b/src/controller.c
index 20a066b80..a8dbdec96 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -528,6 +528,7 @@ rspamd_controller_handle_get_map (struct rspamd_http_connection_entry *conn_ent,
/* Read the whole buffer */
if (read (fd, reply->body->str, st.st_size) == -1) {
+ close (fd);
rspamd_http_message_free (reply);
msg_err ("cannot read map %s: %s", map->uri, strerror (errno));
rspamd_controller_send_error (conn_ent, 500, "500 map read error");