From 46ad509bf8c5e3fd881a70be4e4bc2cced054b86 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 19 Nov 2014 13:57:39 +0000 Subject: [PATCH] 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 --- sbin/ifconfig/ifgroup.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sbin/ifconfig/ifgroup.c b/sbin/ifconfig/ifgroup.c index f8b18b4a9835..e3f271d4429f 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