From 74e121f93b3bf7cd36f1f4554951280d71bbf8c2 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 3 Nov 2023 16:02:32 +0100 Subject: [PATCH] librpc: Fix error path cleanups in start_rpc_host_send() Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/rpc_client/local_np.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.47.3