From bd355c598bcfef7897e7af3418ef1fa438beedc3 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 26 Jun 2017 19:11:21 +0400 Subject: fixed segfault in test_client --- tests/test_client.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_client.c b/tests/test_client.c index 7103914..8434611 100644 --- a/tests/test_client.c +++ b/tests/test_client.c @@ -303,7 +303,7 @@ cert_filename should point to file that contains client certificate, private key c2ns[0] = c; - while(PICA_event_loop(c2ns, 500) == PICA_OK) + while(PICA_event_loop(c2ns, 500) == PICA_OK && c != NULL) { //puts("event loop..."); if (peerid && connected_to_node == 1 && c2c_active == 0 && c2c_in_progress == 0) @@ -367,10 +367,6 @@ cert_filename should point to file that contains client certificate, private key - - if (chn) - PICA_close_c2c(chn); - if (c) PICA_close_c2n(c); -- cgit v1.2.1