We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c00c446 commit 8a7d61bCopy full SHA for 8a7d61b
tools/testing/selftests/bpf/xskxceiver.c
@@ -1606,6 +1606,8 @@ static struct ifobject *ifobject_create(void)
1606
if (!ifobj->umem)
1607
goto out_umem;
1608
1609
+ ifobj->ns_fd = -1;
1610
+
1611
return ifobj;
1612
1613
out_umem:
@@ -1617,6 +1619,8 @@ static struct ifobject *ifobject_create(void)
1617
1619
1618
1620
static void ifobject_delete(struct ifobject *ifobj)
1621
{
1622
+ if (ifobj->ns_fd != -1)
1623
+ close(ifobj->ns_fd);
1624
free(ifobj->umem);
1625
free(ifobj->xsk_arr);
1626
free(ifobj);
0 commit comments