diff options
author | Alan Somers <[email protected]> | 2021-01-26 20:39:28 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-01-28 11:39:00 -0800 |
commit | 5bc4c39d70fbb3dd8dfa8a5708573abd8b801a68 (patch) | |
tree | 89272c623a749b5ffc2391467fdfa98eb5769851 | |
parent | 756e28be5142ff8635d2aab8df321b200cb2e058 (diff) |
Fix a resource leak in uu_avl_pool_destroy
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 #11528
-rw-r--r-- | lib/libuutil/uu_avl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libuutil/uu_avl.c b/lib/libuutil/uu_avl.c index 040008883..53def0e07 100644 --- a/lib/libuutil/uu_avl.c +++ b/lib/libuutil/uu_avl.c @@ -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); |