From: Vsevolod Stakhov Date: Mon, 20 Jan 2014 17:41:59 +0000 (+0000) Subject: Fix memory leak. X-Git-Tag: 0.7.0~468 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa29c7e4cbc6c4c904e5bd265ceb3596a85a5d1e;p=thirdparty%2Frspamd.git Fix memory leak. --- diff --git a/src/client/rspamc.c b/src/client/rspamc.c index f3e632113d..83a4c378f2 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); }