Does not seg fault, if connlist_destroy is called with NULL pointer.
FossilOrigin-Name: b6c763cf443b6549e2f35d2c9ccc69fe0f7e7bbbb8118098dbe52a1e52f80e82
This commit is contained in:
parent
1509e75f4c
commit
ef902cf087
@ -63,6 +63,9 @@ void connlist_unlock(struct connlist * cl)
|
|||||||
|
|
||||||
void connlist_destroy(struct connlist * cl)
|
void connlist_destroy(struct connlist * cl)
|
||||||
{
|
{
|
||||||
|
if (!cl)
|
||||||
|
return;
|
||||||
|
|
||||||
if (cl->t)
|
if (cl->t)
|
||||||
avltree_destroy(cl->t);
|
avltree_destroy(cl->t);
|
||||||
pthread_mutex_destroy(&cl->connlist_mutex);
|
pthread_mutex_destroy(&cl->connlist_mutex);
|
||||||
|
Loading…
Reference in New Issue
Block a user