reclaim sbuf and clear lock on error in ifconf
Submitted by: Ted Unangst Reviewed by: rwatson MFC after: 3 days
This commit is contained in:
parent
afb2e8b616
commit
62313e4c3f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149782
@ -1728,8 +1728,11 @@ ifconf(u_long cmd, caddr_t data)
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user