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:
Gleb Smirnoff 2006-06-02 14:10:52 +00:00
parent f420242b2b
commit 6e86062956
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159174

View file

@ -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);
}