1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

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
This commit is contained in:
Gary Lockyer 2017-09-08 14:03:25 +12:00 committed by Ralph Boehme
parent 6c36ea0737
commit 563bbb9c24

View File

@ -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);