diff options
author | pyruvate <d.pyruvate.kinase@gmail.com> | 2014-07-28 02:54:43 +0300 |
---|---|---|
committer | pyruvate <d.pyruvate.kinase@gmail.com> | 2014-07-28 02:54:43 +0300 |
commit | 87dd6becf78597ef3c82014a0f8199e51b43a525 (patch) | |
tree | 22f608e28a87378131b8215c9eb623d0f11c4dd7 | |
parent | 8aa62cfef7e4f581f88eeaad1cb82f39546bec88 (diff) |
Fix test_many_clients in tox_test
Stack variable to_comp goes out of scope,
but a reference to the variable is used later
in Fiend_Requests.
-rw-r--r-- | auto_tests/tox_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index 1a3c5868..8d4d6c4b 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c | |||
@@ -294,11 +294,11 @@ START_TEST(test_many_clients) | |||
294 | long long unsigned int cur_time = time(NULL); | 294 | long long unsigned int cur_time = time(NULL); |
295 | Tox *toxes[NUM_TOXES]; | 295 | Tox *toxes[NUM_TOXES]; |
296 | uint32_t i, j; | 296 | uint32_t i, j; |
297 | uint32_t to_comp = 974536; | ||
297 | 298 | ||
298 | for (i = 0; i < NUM_TOXES; ++i) { | 299 | for (i = 0; i < NUM_TOXES; ++i) { |
299 | toxes[i] = tox_new(TOX_ENABLE_IPV6_DEFAULT); | 300 | toxes[i] = tox_new(TOX_ENABLE_IPV6_DEFAULT); |
300 | ck_assert_msg(toxes[i] != 0, "Failed to create tox instances %u", i); | 301 | ck_assert_msg(toxes[i] != 0, "Failed to create tox instances %u", i); |
301 | uint32_t to_comp = 974536; | ||
302 | tox_callback_friend_request(toxes[i], accept_friend_request, &to_comp); | 302 | tox_callback_friend_request(toxes[i], accept_friend_request, &to_comp); |
303 | } | 303 | } |
304 | 304 | ||