From aa29c7e4cbc6c4c904e5bd265ceb3596a85a5d1e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 20 Jan 2014 17:41:59 +0000 Subject: Fix memory leak. --- src/client/rspamc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/rspamc.c b/src/client/rspamc.c index f3e632113..83a4c378f 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -202,7 +202,7 @@ read_cmd_line (gint *argc, gchar ***argv) static struct rspamc_command * check_rspamc_command (const gchar *cmd) { - enum rspamc_command_type ct; + enum rspamc_command_type ct = 0; guint i; if (g_ascii_strcasecmp (cmd, "SYMBOLS") == 0 || @@ -525,6 +525,8 @@ rspamc_process_input (struct event_base *ev_base, struct rspamc_command *cmd, } conn = rspamd_client_init (ev_base, connectv[0], port, timeout); + g_strfreev (connectv); + if (conn != NULL) { rspamd_client_command (conn, cmd->name, attrs, in, rspamc_client_cb, cmd, &err); } -- cgit v1.2.3