open_tun_dco_generic() already allocates the tt->actual_name string, which
shadows the allocation in the FreeBSD/Linux specific methods.
Found-By: clang with asan
Change-Id: I51f5fcfff4e5f8203fdb9aec0245cfccd17043cc
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <
20230314144854.182110-2-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26411.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
}
snprintf(tt->dco.ifname, IFNAMSIZ, "%s", ifr.ifr_data);
- tt->actual_name = string_alloc(tt->dco.ifname, NULL);
/* see "Interface Flags" in ifnet(9) */
int i = IFF_POINTOPOINT | IFF_MULTICAST;
msg(M_FATAL, "DCO: cannot retrieve ifindex for interface %s", dev);
}
- tt->actual_name = string_alloc(dev, NULL);
tt->dco.dco_message_peer_id = -1;
ovpn_dco_register(&tt->dco);