summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-09-29 13:06:08 +0200
committerStefan Metzmacher <metze@samba.org>2017-10-02 09:05:22 +0200
commitc7f33ca3183a68be725587044ce8cf0c44d5d549 (patch)
tree9af3a07cfc0f28e814f1436f0348b0a34bd515d2 /lib
parent634514a8d431b45a070f1d052b552bcf5f0a3bee (diff)
downloadsamba-c7f33ca3183a68be725587044ce8cf0c44d5d549.tar.gz
lib/util/run_cmd: ensure fd_stdin gets set to -1 in the destructor
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13062 Pair-programmed-with: Stefan Metzmacher <metze@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> (cherry picked from commit 4aaf072d1fd732abf2cbea135d508260cdafa4eb)
Diffstat (limited to 'lib')
-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 ef3402ad33f..9c6cb307a8e 100644
--- a/lib/util/util_runcmd.c
+++ b/lib/util/util_runcmd.c
@@ -41,6 +41,7 @@ static int samba_runcmd_state_destructor(struct samba_runcmd_state *state)
if (state->fd_stdin != -1) {
close(state->fd_stdin);
+ state->fd_stdin = -1;
}
return 0;
}