aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-10-08 16:29:51 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-10-08 16:29:51 +0100
commit10acf9beeee22af3703f84315635dd51858a3290 (patch)
treed452a491a7f69279fa4026cab124b2f666c4123c
parent8c9ab088abc82ab6d701b269a72d5a2f6e4d1ccc (diff)
downloadrspamd-10acf9beeee22af3703f84315635dd51858a3290.tar.gz
rspamd-10acf9beeee22af3703f84315635dd51858a3290.zip
Print filename properly.
-rw-r--r--src/client/rspamc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c
index 3107c74f4..d2efc6ab4 100644
--- a/src/client/rspamc.c
+++ b/src/client/rspamc.c
@@ -252,7 +252,7 @@ struct rspamc_command {
struct rspamc_callback_data {
struct rspamc_command *cmd;
- const gchar *filename;
+ gchar *filename;
};
/*
@@ -778,6 +778,7 @@ rspamc_client_cb (struct rspamd_client_connection *conn,
fflush (stdout);
rspamd_client_destroy (conn);
+ g_free (cbdata->filename);
g_slice_free1 (sizeof (struct rspamc_callback_data), cbdata);
}
@@ -815,7 +816,7 @@ rspamc_process_input (struct event_base *ev_base, struct rspamc_command *cmd,
if (conn != NULL) {
cbdata = g_slice_alloc (sizeof (struct rspamc_callback_data));
cbdata->cmd = cmd;
- cbdata->filename = name;
+ cbdata->filename = g_strdup (name);
if (cmd->need_input) {
rspamd_client_command (conn, cmd->path, attrs, in, rspamc_client_cb,
cbdata, &err);