summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2012-04-15 03:10:44 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2012-04-15 03:10:44 +0000
commit835f7dcd20043dfc07053ae2a228e62135fc109f (patch)
tree6a0e3b37b331a931d28a215fb13cb67b74f780d6 /sbin
parent1953ec485a4eaed6f8d28b1ddcc90b378a8cb8c0 (diff)
fix a leak
ok krw@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 53e69e931ea..bd92def8c06 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.254 2012/02/02 12:34:37 benno Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.255 2012/04/15 03:10:43 jsg Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -935,8 +935,10 @@ printif(char *ifname, int ifaliases)
nlen = strlen(oname);
#ifndef SMALL
if (nlen && !isdigit(oname[nlen - 1])) /* is it a group? */
- if (printgroup(oname, ifaliases) != -1)
+ if (printgroup(oname, ifaliases) != -1) {
+ free(oname);
return;
+ }
#endif
}