librpc: Fix error path cleanups in start_rpc_host_send()
authorVolker Lendecke <vl@samba.org>
Fri, 3 Nov 2023 15:02:32 +0000 (16:02 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 7 Nov 2023 12:46:37 +0000 (12:46 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/rpc_client/local_np.c

index 2e9d1b4febeb593226ec805c412b5c694fe576d7..10c6434e397c1ce101b81d01f4d7840e2ca90db2 100644 (file)
@@ -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;
        }