]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: listeners: remove unreachable code in clone_listener()
authorWilly Tarreau <w@1wt.eu>
Sat, 16 Oct 2021 12:58:30 +0000 (14:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 16 Oct 2021 12:58:30 +0000 (14:58 +0200)
Coverity reported in issue #1416 that label oom3 is not reachable in
function close_listener() added by commit 59a877dfd ("MINOR: listeners:
add clone_listener() to duplicate listeners at boot time"). The code
leading to it was removed during the development of the function, but
not the label itself.

src/listener.c

index 5c2eb210a9c6aa8616101f0686e87ad2598a5517..c4be8dd0a02f02b9314f597b39030b359958d204 100644 (file)
@@ -704,8 +704,6 @@ struct listener *clone_listener(struct listener *src)
        global.maxsock++;
        return l;
 
- oom3:
-       free(l->name);
  oom2:
        free(l);
  oom1: