Do not leak kernel memory in case if userland has been compiled

against older NG_VERSION.

Coverity ID:	1131
This commit is contained in:
Gleb Smirnoff 2006-05-16 09:32:58 +00:00
parent 6befa6ae1b
commit 00570db37b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158643

View File

@ -257,6 +257,7 @@ ngc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
m_copydata(m, 0, len, (char *)msg);
if (msg->header.version != NG_VERSION) {
FREE(msg, M_NETGRAPH_MSG);
error = EINVAL;
goto release;
}