Skip to content
Snippets Groups Projects
Commit 5fe30380 authored by Andy Green's avatar Andy Green
Browse files

lwsac: unreference: allow to be called with NULL

parent 5fe75e80
Branches
No related tags found
No related merge requests found
...@@ -168,6 +168,8 @@ lwsac_reference(struct lwsac *head) ...@@ -168,6 +168,8 @@ lwsac_reference(struct lwsac *head)
void void
lwsac_unreference(struct lwsac **head) lwsac_unreference(struct lwsac **head)
{ {
if (!(*head))
return;
(*head)->refcount--; (*head)->refcount--;
if ((*head)->detached && !(*head)->refcount) if ((*head)->detached && !(*head)->refcount)
lwsac_free(head); lwsac_free(head);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment