mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 14:54:24 +00:00
Fix gif_output() so that GIF_UNLOCK() is performed only in case
we have locked the softc. PR: kern/98298 Submitted by: Eugene Grosbein
This commit is contained in:
parent
f420242b2b
commit
6e86062956
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159174
|
@ -412,6 +412,7 @@ gif_output(ifp, m, dst, rt)
|
|||
|
||||
if (!(ifp->if_flags & IFF_UP) ||
|
||||
sc->gif_psrc == NULL || sc->gif_pdst == NULL) {
|
||||
GIF_UNLOCK(sc);
|
||||
m_freem(m);
|
||||
error = ENETDOWN;
|
||||
goto end;
|
||||
|
@ -453,13 +454,12 @@ gif_output(ifp, m, dst, rt)
|
|||
default:
|
||||
m_freem(m);
|
||||
error = ENETDOWN;
|
||||
goto end;
|
||||
}
|
||||
|
||||
GIF_UNLOCK(sc);
|
||||
end:
|
||||
if (error)
|
||||
ifp->if_oerrors++;
|
||||
GIF_UNLOCK(sc);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue