The Samba-Bugzilla – Attachment 11849 Details for
Bug 11742
tevent_add_signal() can cause a memory leak.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.4.0, 4.3.next, 4.2.next.
0001-lib-tevent-Fix-memory-leak-reported-by-Pavel-B-ezina.patch (text/plain), 2.00 KB, created by
Jeremy Allison
on 2016-02-18 22:08:01 UTC
(
hide
)
Description:
git-am fix for 4.4.0, 4.3.next, 4.2.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-02-18 22:08:01 UTC
Size:
2.00 KB
patch
obsolete
>From a8defaad1e534e7b0127702aa5133f4611c6d3a9 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 16 Feb 2016 14:23:53 -0800 >Subject: [PATCH] =?UTF-8?q?lib:=20tevent:=20Fix=20memory=20leak=20reported?= > =?UTF-8?q?=20by=20Pavel=20B=C5=99ezina=20<pbrezina@redhat.com>=20when=20o?= > =?UTF-8?q?ld=20signal=20action=20restored.?= >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11742 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Andreas Schneider <asn@samba.org> > >Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> >Autobuild-Date(master): Thu Feb 18 01:42:50 CET 2016 on sn-devel-144 > >(cherry picked from commit 833a2f474367624dd9980abb28227850e95fe976) >--- > lib/tevent/tevent_signal.c | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c >index 924dc05..9bc11ed 100644 >--- a/lib/tevent/tevent_signal.c >+++ b/lib/tevent/tevent_signal.c >@@ -212,6 +212,7 @@ static int tevent_signal_destructor(struct tevent_signal *se) > /* restore old handler, if any */ > if (sig_state->oldact[se->signum]) { > sigaction(se->signum, sig_state->oldact[se->signum], NULL); >+ talloc_free(sig_state->oldact[se->signum]); > sig_state->oldact[se->signum] = NULL; > } > #ifdef SA_SIGINFO >@@ -342,6 +343,8 @@ struct tevent_signal *tevent_common_add_signal(struct tevent_context *ev, > return NULL; > } > if (sigaction(signum, &act, sig_state->oldact[signum]) == -1) { >+ talloc_free(sig_state->oldact[signum]); >+ sig_state->oldact[signum] = NULL; > talloc_free(se); > return NULL; > } >@@ -505,6 +508,7 @@ void tevent_cleanup_pending_signal_handlers(struct tevent_signal *se) > if (sig_state->sig_handlers[se->signum] == NULL) { > if (sig_state->oldact[se->signum]) { > sigaction(se->signum, sig_state->oldact[se->signum], NULL); >+ talloc_free(sig_state->oldact[se->signum]); > sig_state->oldact[se->signum] = NULL; > } > } >-- >2.7.0.rc3.207.g0ac5344 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review-
Actions:
View
Attachments on
bug 11742
:
11849