aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamadm/configtest.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-27 15:28:07 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-27 15:28:07 +0100
commit3da3ad2506b2326ca533b11b9ab8e2cebb92b63f (patch)
tree1c800b76dcb68953cd0ea141b87ed816fab46768 /src/rspamadm/configtest.c
parent0cde7b0683bf3f9550ad97bfdbedc22511c1505c (diff)
downloadrspamd-3da3ad2506b2326ca533b11b9ab8e2cebb92b63f.tar.gz
rspamd-3da3ad2506b2326ca533b11b9ab8e2cebb92b63f.zip
[Minor] Further static leaks removal
Diffstat (limited to 'src/rspamadm/configtest.c')
-rw-r--r--src/rspamadm/configtest.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rspamadm/configtest.c b/src/rspamadm/configtest.c
index 6c07959db..1ebabe48b 100644
--- a/src/rspamadm/configtest.c
+++ b/src/rspamadm/configtest.c
@@ -128,12 +128,16 @@ rspamadm_configtest (gint argc, gchar **argv, const struct rspamadm_command *cmd
g_option_context_free (context);
if (config == NULL) {
+ static gchar fbuf[PATH_MAX];
+
if ((confdir = g_hash_table_lookup (ucl_vars, "CONFDIR")) == NULL) {
confdir = RSPAMD_CONFDIR;
}
- config = g_strdup_printf ("%s%c%s", confdir, G_DIR_SEPARATOR,
+ rspamd_snprintf (fbuf, sizeof (fbuf), "%s%c%s",
+ confdir, G_DIR_SEPARATOR,
"rspamd.conf");
+ config = fbuf;
}
pworker = &workers[0];