diff options
author | sam <sam@FreeBSD.org> | 2005-09-04 17:32:47 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-09-04 17:32:47 +0000 |
commit | 3a5df528ddfaf9884de6daee416856069f5011dd (patch) | |
tree | 9a60e11a2262003bb765c0521520652df599e8b9 /sys/net/if.c | |
parent | ce5d9c9b6dd571b4283b6061ea0da0c36d2f5488 (diff) | |
download | FreeBSD-src-3a5df528ddfaf9884de6daee416856069f5011dd.zip FreeBSD-src-3a5df528ddfaf9884de6daee416856069f5011dd.tar.gz |
reclaim sbuf and clear lock on error in ifconf
Submitted by: Ted Unangst
Reviewed by: rwatson
MFC after: 3 days
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 7090648..61575c8 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1728,8 +1728,11 @@ again: memset(ifr.ifr_name, 0, sizeof(ifr.ifr_name)); if (strlcpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name)) - >= sizeof(ifr.ifr_name)) + >= sizeof(ifr.ifr_name)) { + sbuf_delete(sb); + IFNET_RUNLOCK(); return (ENAMETOOLONG); + } addrs = 0; TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { |