summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig/ifgroup.c
diff options
context:
space:
mode:
authorfeld <feld@FreeBSD.org>2014-11-19 13:57:39 +0000
committerfeld <feld@FreeBSD.org>2014-11-19 13:57:39 +0000
commitcaef3be9c61814aa6e41a899d2a9a33f5c6c5285 (patch)
tree6fc0b555641c30cccd037dd8aeaef10136a2a0e1 /sbin/ifconfig/ifgroup.c
parent0d0f5282c77d2a3c4c86cee3745c4c40b02b30d6 (diff)
downloadFreeBSD-src-caef3be9c61814aa6e41a899d2a9a33f5c6c5285.zip
FreeBSD-src-caef3be9c61814aa6e41a899d2a9a33f5c6c5285.tar.gz
Expose groups by default in ifconfig output. This was never hidden by
OpenBSD; unsure why we chose to do so. As groups are a requirement for pf, exposing them by default will make our pf implementation less confusing. While here add a missing free() that OpenBSD fixed 7 years ago. PR: 194925 Differential Revision: https://reviews.freebsd.org/D1185 Approved by: des Obtained from: OpenBSD
Diffstat (limited to 'sbin/ifconfig/ifgroup.c')
-rw-r--r--sbin/ifconfig/ifgroup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifgroup.c b/sbin/ifconfig/ifgroup.c
index f8b18b4..e3f271d 100644
--- a/sbin/ifconfig/ifgroup.c
+++ b/sbin/ifconfig/ifgroup.c
@@ -86,9 +86,6 @@ getifgroups(int s)
struct ifgroupreq ifgr;
struct ifg_req *ifg;
- if (!verbose)
- return;
-
memset(&ifgr, 0, sizeof(ifgr));
strlcpy(ifgr.ifgr_name, name, IFNAMSIZ);
@@ -121,6 +118,8 @@ getifgroups(int s)
}
if (cnt)
printf("\n");
+
+ free(ifgr.ifgr_groups);
}
static void
OpenPOWER on IntegriCloud