diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2017-09-08 14:03:25 +1200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2017-09-17 13:56:23 +0200 |
commit | d02af0b151affcd9c63ab1701f8025f4927437f9 (patch) | |
tree | ebcb12001c5f94e3726f5ffdeea698ccb0638682 /lib/util/util_runcmd.c | |
parent | 21624ed39eb0aecea65aee79df3f5b286001edd0 (diff) | |
download | samba-d02af0b151affcd9c63ab1701f8025f4927437f9.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
(cherry picked from commit 563bbb9c24d1d0bcc64530a6635b8b82d1ebb24d)
Autobuild-User(v4-7-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-7-test): Sun Sep 17 13:56:23 CEST 2017 on sn-devel-144
Diffstat (limited to 'lib/util/util_runcmd.c')
-rw-r--r-- | lib/util/util_runcmd.c | 1 |
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); |