diff options
Diffstat (limited to 'src/client/rspamc.c')
-rw-r--r-- | src/client/rspamc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c index 303669405..075f0a487 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -411,6 +411,7 @@ read_cmd_line (gint *argc, gchar ***argv) /* Parse options */ if (!g_option_context_parse (context, argc, argv, &error)) { fprintf (stderr, "option parsing failed: %s\n", error->message); + g_option_context_free (context); exit (EXIT_FAILURE); } @@ -418,6 +419,7 @@ read_cmd_line (gint *argc, gchar ***argv) raw = TRUE; } /* Argc and argv are shifted after this function */ + g_option_context_free (context); } static gboolean @@ -562,7 +564,8 @@ add_options (GQueue *opts) if (ip != NULL) { rspamd_inet_addr_t *addr = NULL; - if (!rspamd_parse_inet_address (&addr, ip, strlen (ip))) { + if (!rspamd_parse_inet_address (&addr, ip, strlen (ip), + RSPAMD_INET_ADDRESS_PARSE_DEFAULT)) { /* Try to resolve */ struct addrinfo hints, *res, *cur; gint r; |