1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

dont leak file descriptors

(This used to be ctdb commit 268c3e4b269a92741a02280c84384178e73de10e)
This commit is contained in:
Ronnie Sahlberg 2009-06-19 14:54:22 +10:00
parent d72b14e86c
commit d3c5fb4bd1

View File

@ -2435,6 +2435,10 @@ static int check_recovery_lock(struct ctdb_context *ctdb)
state->child = fork();
if (state->child == (pid_t)-1) {
DEBUG(DEBUG_CRIT,(__location__ " fork() failed in check_reclock child\n"));
close(state->fd[0]);
state->fd[0] = -1;
close(state->fd[1]);
state->fd[1] = -1;
talloc_free(state);
return -1;
}