git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca71576
)
tevent: Fix a memleak on FreeBSD
author
Volker Lendecke
<vl@samba.org>
Wed, 24 May 2017 14:21:40 +0000
(16:21 +0200)
committer
Jeremy Allison
<jra@samba.org>
Thu, 8 Jun 2017 18:38:19 +0000
(20:38 +0200)
FreeBSD has malloc'ed memory attached to mutexes. We need to clean this up.
valgrind really helped here
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tevent/tevent.c
patch
|
blob
|
history
diff --git
a/lib/tevent/tevent.c
b/lib/tevent/tevent.c
index 7d59c8b1a83319169ebe85c34411a17bf473d6ac..f3b18a1527212104b696fc72c236a0e1870a9914 100644
(file)
--- a/
lib/tevent/tevent.c
+++ b/
lib/tevent/tevent.c
@@
-341,6
+341,11
@@
int tevent_common_context_destructor(struct tevent_context *ev)
DLIST_REMOVE(ev->threaded_contexts, tctx);
}
+
+ ret = pthread_mutex_destroy(&ev->scheduled_mutex);
+ if (ret != 0) {
+ abort();
+ }
#endif
tevent_common_wakeup_fini(ev);