Skip to content

Commit

Permalink
Fix a resource leak in uu_avl_pool_destroy
Browse files Browse the repository at this point in the history
Need to destroy the pthread mutex created in uu_avl_pool_create.

https://svnweb.freebsd.org/base?view=revision&revision=262912

Obtained from: FreeBSD
Sponsored by:	Spectra Logic Corporation
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alan Somers <[email protected]>
Closes openzfs#11528
  • Loading branch information
asomers authored and RageLtMan committed May 31, 2021
1 parent 4fcdd43 commit 33fd16a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/libuutil/uu_avl.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ uu_avl_pool_destroy(uu_avl_pool_t *pp)
pp->uap_next->uap_prev = pp->uap_prev;
pp->uap_prev->uap_next = pp->uap_next;
(void) pthread_mutex_unlock(&uu_apool_list_lock);
(void) pthread_mutex_destroy(&pp->uap_lock);
pp->uap_prev = NULL;
pp->uap_next = NULL;
uu_free(pp);
Expand Down

0 comments on commit 33fd16a

Please sign in to comment.