--- a/net/can/isotp.c +++ b/net/can/isotp.c @@ -1139,6 +1139,7 @@ static int isotp_getname(struct socket * if (peer) return -EOPNOTSUPP; + memset(addr, 0, sizeof(*addr)); addr->can_family = AF_CAN; addr->can_ifindex = so->ifindex; addr->can_addr.tp.rx_id = so->rxid;