Skip to content

Commit 9034d73

Browse files
Tomasz BursztykaAnas Nashif
authored andcommitted
tests/dns_resolve: Fix possible NULL dereference
Coverity-CID: 173653 Jira: ZEP-2531 Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent 8e77ef5 commit 9034d73

File tree

1 file changed

+4
-0
lines changed
  • tests/net/lib/dns_resolve/src

1 file changed

+4
-0
lines changed

tests/net/lib/dns_resolve/src/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ static void test_init(void)
227227
DBG("Cannot add IPv6 address %s\n",
228228
net_sprint_ipv6_addr(&ll_addr));
229229
zassert_not_null(ifaddr, "ll_addr");
230+
231+
return;
230232
}
231233

232234
ifaddr->addr_state = NET_ADDR_PREFERRED;
@@ -239,6 +241,8 @@ static void test_init(void)
239241
DBG("Cannot add IPv4 address %s\n",
240242
net_sprint_ipv4_addr(&my_addr2));
241243
zassert_not_null(ifaddr, "addr2");
244+
245+
return;
242246
}
243247

244248
ifaddr->addr_state = NET_ADDR_PREFERRED;

0 commit comments

Comments
 (0)