diff options
author | asomers <asomers@FreeBSD.org> | 2014-03-07 23:01:35 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2014-03-07 23:01:35 +0000 |
commit | 2c64d4aa1f66230814029bf17de6b4536a64ece8 (patch) | |
tree | ff29136c1ad699edae2dfea2edf7c532314b964f /cddl/contrib | |
parent | c81a3d85c665d51f31818f8f2e5e724692806c54 (diff) | |
download | FreeBSD-src-2c64d4aa1f66230814029bf17de6b4536a64ece8.zip FreeBSD-src-2c64d4aa1f66230814029bf17de6b4536a64ece8.tar.gz |
cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c
Fix a memory leak in uu_avl_pool_create: pthread_mutex_init without
a corresponding pthread_mutex_destroy. It shows up, among other
places, when doing "zfs list".
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation
Diffstat (limited to 'cddl/contrib')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c b/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c index 308e920..5e78ece 100644 --- a/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c +++ b/cddl/contrib/opensolaris/lib/libuutil/common/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); |