mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 11:23:43 +08:00
net/l2tpv3: Remove redundant check in net_init_l2tpv3()
The result has been checked to be NULL before, it cannot be NULL here, so the check is redundant. Remove it. Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: AlexChen <alex.chen@huawei.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
7564bf7701
commit
d949fe64b0
@ -655,9 +655,8 @@ int net_init_l2tpv3(const Netdev *netdev,
|
||||
error_setg(errp, "could not bind socket err=%i", errno);
|
||||
goto outerr;
|
||||
}
|
||||
if (result) {
|
||||
freeaddrinfo(result);
|
||||
}
|
||||
|
||||
freeaddrinfo(result);
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
|
||||
@ -686,9 +685,7 @@ int net_init_l2tpv3(const Netdev *netdev,
|
||||
memcpy(s->dgram_dst, result->ai_addr, result->ai_addrlen);
|
||||
s->dst_size = result->ai_addrlen;
|
||||
|
||||
if (result) {
|
||||
freeaddrinfo(result);
|
||||
}
|
||||
freeaddrinfo(result);
|
||||
|
||||
if (l2tpv3->has_counter && l2tpv3->counter) {
|
||||
s->has_counter = true;
|
||||
|
Loading…
Reference in New Issue
Block a user