Changeset 5231 for pjproject


Ignore:
Timestamp:
Dec 31, 2015 10:28:19 AM (8 years ago)
Author:
ming
Message:

Re #1882 (misc): Add checks as ssocket_cli and state_cli can be NULL

Thanks to Dusan Klinec for the original patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pjlib-test/ssl_sock.c

    r5076 r5231  
    13191319        pj_ssl_sock_close(ssock_serv); 
    13201320 
    1321     for (i = 0; i < clients; ++i) { 
    1322         if (ssock_cli[i] && !state_cli[i].err && !state_cli[i].done) 
    1323             pj_ssl_sock_close(ssock_cli[i]); 
     1321    if (ssock_cli && state_cli) { 
     1322        for (i = 0; i < clients; ++i) { 
     1323            if (ssock_cli[i] && !state_cli[i].err && !state_cli[i].done) 
     1324                pj_ssl_sock_close(ssock_cli[i]); 
     1325        } 
    13241326    } 
    13251327    if (ioqueue) 
Note: See TracChangeset for help on using the changeset viewer.