]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: remove redundant closing socket
authoranlan_cs <anlan_cs@tom.com>
Sat, 23 Sep 2023 12:50:30 +0000 (20:50 +0800)
committeranlan_cs <anlan_cs@tom.com>
Sat, 23 Sep 2023 13:06:32 +0000 (21:06 +0800)
The socket has been closed in `ssmpingd_setsockopt()` in the wrong cases,
so remove the redundant closing socket from outer layer.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
pimd/pim_ssmpingd.c

index dadf29f5353af6fb1bdc60afe9c2aa27d1b0b7b9..27dbb0d6b4e8c38858b6b0257133adf9c8b1ce22 100644 (file)
@@ -185,7 +185,6 @@ static int ssmpingd_socket(pim_addr addr, int port, int mttl)
        ret = ssmpingd_setsockopt(fd, addr, mttl);
        if (ret) {
                zlog_warn("ssmpingd_setsockopt failed");
-               close(fd);
                return -1;
        }