summaryrefslogtreecommitdiffstats
path: root/tests/test_client.c
diff options
context:
space:
mode:
authorAnton <anton@picapica>2017-06-26 19:11:21 +0400
committerAnton <anton@picapica>2017-06-26 19:11:21 +0400
commitbd355c598bcfef7897e7af3418ef1fa438beedc3 (patch)
tree14b6b3e2326bf6d70c4b65785f5c19ddf962d5f5 /tests/test_client.c
parent41117d6c03271b971e48c5d5989168f826dfddcd (diff)
downloadpica-pica-bd355c598bcfef7897e7af3418ef1fa438beedc3.tar.gz
pica-pica-bd355c598bcfef7897e7af3418ef1fa438beedc3.zip
fixed segfault in test_client
Diffstat (limited to 'tests/test_client.c')
-rw-r--r--tests/test_client.c6
1 files changed, 1 insertions, 5 deletions
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);