Skip to content

Commit

Permalink
net: igmp: Fix uninitialized variable
Browse files Browse the repository at this point in the history
The return value might be uninitialized if there was no
suitable IPv4 address found for the network interface.

Coverity-CID: 224630
Fixes #35158

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
  • Loading branch information
jukkar authored and galak committed May 11, 2021
1 parent 76dee39 commit f602801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/net/ip/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static int send_igmp_report(struct net_if *iface,
struct net_if_ipv4 *ipv4 = iface->config.ip.ipv4;
struct net_pkt *pkt = NULL;
int i, count = 0;
int ret;
int ret = 0;

if (!ipv4) {
return -ENOENT;
Expand Down

0 comments on commit f602801

Please sign in to comment.