summaryrefslogtreecommitdiff
path: root/lib/util/util_runcmd.c
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2017-09-08 14:03:25 +1200
committerRalph Boehme <slow@samba.org>2017-09-16 23:50:27 +0200
commit563bbb9c24d1d0bcc64530a6635b8b82d1ebb24d (patch)
tree9e43e62eb9cb13449e290c3718c545550bb238ea /lib/util/util_runcmd.c
parent6c36ea0737ae12fc97e4a024588e6a3845caf329 (diff)
downloadsamba-563bbb9c24d1d0bcc64530a6635b8b82d1ebb24d.tar.gz
util_runcmd: Free the fde in event handler.
Free the fde in the event handler to prevent the event triggering again While not strictly necessary in this case, this code serves as an example of the usage of tfork. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13037 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sat Sep 16 23:50:27 CEST 2017 on sn-devel-144
Diffstat (limited to 'lib/util/util_runcmd.c')
-rw-r--r--lib/util/util_runcmd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/util/util_runcmd.c b/lib/util/util_runcmd.c
index ac74371e76d..6077fddde56 100644
--- a/lib/util/util_runcmd.c
+++ b/lib/util/util_runcmd.c
@@ -275,6 +275,7 @@ static void samba_runcmd_io_handler(struct tevent_context *ev,
tevent_req_error(req, errno);
return;
}
+ TALLOC_FREE(fde);
if (WIFEXITED(status)) {
status = WEXITSTATUS(status);