Does not seg fault, if connlist_destroy is called with NULL pointer.

FossilOrigin-Name: b6c763cf443b6549e2f35d2c9ccc69fe0f7e7bbbb8118098dbe52a1e52f80e82
This commit is contained in:
7u83@mail.ru 2015-04-29 09:39:13 +00:00
parent 1509e75f4c
commit ef902cf087
1 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,9 @@ void connlist_unlock(struct connlist * cl)
void connlist_destroy(struct connlist * cl)
{
if (!cl)
return;
if (cl->t)
avltree_destroy(cl->t);
pthread_mutex_destroy(&cl->connlist_mutex);