diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-11-02 19:03:15 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-11-02 19:03:15 +0000 |
commit | 96346543001368d5ee1a3b19a4315ad2a5fd3e13 (patch) | |
tree | 986e636074a07c9e013b5d7dabb5c43247f17418 | |
parent | 751d22ec96231b64d0cc282aeefb33ea7ffc47d5 (diff) | |
download | rspamd-96346543001368d5ee1a3b19a4315ad2a5fd3e13.tar.gz rspamd-96346543001368d5ee1a3b19a4315ad2a5fd3e13.zip |
Some more fixes to the test.
-rw-r--r-- | src/libutil/upstream.c | 3 | ||||
-rw-r--r-- | test/rspamd_upstream_test.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index b18e2585f..2ff8f2651 100644 --- a/src/libutil/upstream.c +++ b/src/libutil/upstream.c @@ -367,6 +367,9 @@ rspamd_upstreams_parse_line (struct upstream_list *ups, if (rspamd_upstreams_add_upstream (ups, tmp, def_port, data)) { ret = TRUE; } + else { + g_free (tmp); + } } p += len; /* Skip separators */ diff --git a/test/rspamd_upstream_test.c b/test/rspamd_upstream_test.c index 531f0bd27..5c25f120d 100644 --- a/test/rspamd_upstream_test.c +++ b/test/rspamd_upstream_test.c @@ -27,7 +27,7 @@ #include "main.h" #include "upstream.h" -const char *test_upstream_list = "microsoft.com:443:1,google.com:2,kernel.org:443:3"; +const char *test_upstream_list = "microsoft.com:443:1,google.com:80:2,kernel.org:443:3"; static void @@ -69,5 +69,8 @@ rspamd_upstream_test_func (void) /* Test round-robin rotation */ rspamd_upstream_test_method (ls, RSPAMD_UPSTREAM_ROUND_ROBIN, "kernel.org"); rspamd_upstream_test_method (ls, RSPAMD_UPSTREAM_ROUND_ROBIN, "google.com"); + rspamd_upstream_test_method (ls, RSPAMD_UPSTREAM_ROUND_ROBIN, "kernel.org"); rspamd_upstream_test_method (ls, RSPAMD_UPSTREAM_ROUND_ROBIN, "microsoft.com"); + rspamd_upstream_test_method (ls, RSPAMD_UPSTREAM_ROUND_ROBIN, "google.com"); + rspamd_upstream_test_method (ls, RSPAMD_UPSTREAM_ROUND_ROBIN, "kernel.org"); } |