From: Volker Lendecke Date: Fri, 3 Nov 2023 15:02:32 +0000 (+0100) Subject: librpc: Fix error path cleanups in start_rpc_host_send() X-Git-Tag: talloc-2.4.2~839 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74e121f93b3bf7cd36f1f4554951280d71bbf8c2;p=thirdparty%2Fsamba.git librpc: Fix error path cleanups in start_rpc_host_send() Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/rpc_client/local_np.c b/source3/rpc_client/local_np.c index 2e9d1b4febe..10c6434e397 100644 --- a/source3/rpc_client/local_np.c +++ b/source3/rpc_client/local_np.c @@ -403,11 +403,11 @@ static struct tevent_req *start_rpc_host_send( return req; fail: - if (ready_fds[0] == -1) { + if (ready_fds[0] != -1) { close(ready_fds[0]); ready_fds[0] = -1; } - if (ready_fds[1] == -1) { + if (ready_fds[1] != -1) { close(ready_fds[1]); ready_fds[1] = -1; }