diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-20 13:47:49 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-20 13:47:49 +0100 |
commit | db0d6a70be9f0a69165a7bab0757b0978af74231 (patch) | |
tree | c64d4a431e82556c4334d7d375016c46204f567c /test | |
parent | 13678bed5f6c64e8e108dcc4ab6a9f94fee11401 (diff) | |
download | rspamd-db0d6a70be9f0a69165a7bab0757b0978af74231.tar.gz rspamd-db0d6a70be9f0a69165a7bab0757b0978af74231.zip |
Fix memory allocation in http test
Diffstat (limited to 'test')
-rw-r--r-- | test/rspamd_http_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/rspamd_http_test.c b/test/rspamd_http_test.c index 5225ed3e0..25bbc240c 100644 --- a/test/rspamd_http_test.c +++ b/test/rspamd_http_test.c @@ -265,7 +265,7 @@ rspamd_http_test_func (void) guint i, j; pid_t *sfd; GString *b32_key; - double diff, total_diff = 0.0, latency[pconns * ntests], mean, std; + double diff, total_diff = 0.0, *latency, mean, std; rspamd_cryptobox_init (); rspamd_snprintf (filepath, sizeof (filepath), "/tmp/http-test-XXXXXX"); @@ -286,6 +286,7 @@ rspamd_http_test_func (void) } sfd = g_alloca (sizeof (*sfd) * nservers); + latency = g_malloc0 (pconns * ntests * sizeof (gdouble)); buf = g_malloc (file_size); memset (buf, 0, file_size); |