aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-18 23:36:42 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-18 23:36:42 +0000
commit20457a019f6940fbb6e6a5e89ab23f42b126ad3b (patch)
treef35c0e725a830b6242ef4b9f2624ad65875d5aa9 /src/rspamd.c
parent6950e3a46bace0e026d0a0df67f931ca459ac0a7 (diff)
downloadrspamd-20457a019f6940fbb6e6a5e89ab23f42b126ad3b.tar.gz
rspamd-20457a019f6940fbb6e6a5e89ab23f42b126ad3b.zip
[Fix] Fix memory corruprtion and leak
Diffstat (limited to 'src/rspamd.c')
-rw-r--r--src/rspamd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rspamd.c b/src/rspamd.c
index 6a9c4f321..877ac00a5 100644
--- a/src/rspamd.c
+++ b/src/rspamd.c
@@ -160,6 +160,7 @@ read_cmd_line (gint *argc, gchar ***argv, struct rspamd_config *cfg)
if (!g_option_context_parse (context, argc, argv, &error)) {
fprintf (stderr, "option parsing failed: %s\n", error->message);
+ g_option_context_free (context);
exit (1);
}
@@ -192,6 +193,7 @@ read_cmd_line (gint *argc, gchar ***argv, struct rspamd_config *cfg)
}
cfg->pid_file = rspamd_pidfile;
+ g_option_context_free (context);
}
/* Detect privilleged mode */