Skip to content

Commit

Permalink
lwsac: unreference: allow to be called with NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
lws-team committed Nov 28, 2018
1 parent 4edd5ca commit 30be5cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/misc/lwsac/lwsac.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ lwsac_reference(struct lwsac *head)
void
lwsac_unreference(struct lwsac **head)
{
if (!(*head))
return;
(*head)->refcount--;
if ((*head)->detached && !(*head)->refcount)
lwsac_free(head);
Expand Down

0 comments on commit 30be5cb

Please sign in to comment.