libnetworking: Disconnect after mbuf shortage

The missing disconnect left the socket in an unusable state.  Each send
request resulted in an EISCONN error.
This commit is contained in:
Sebastian Huber
2012-11-02 14:45:50 +01:00
committed by Gedare Bloom
parent 0e75aae563
commit 45f9cd01f5

View File

@@ -399,8 +399,11 @@ udp_output(struct inpcb *inp, struct mbuf *m, struct mbuf *addr,
M_PREPEND(m, sizeof(struct udpiphdr), M_DONTWAIT);
if (m == 0) {
error = ENOBUFS;
if (addr)
if (addr) {
in_pcbdisconnect(inp);
inp->inp_laddr = laddr;
splx(s);
}
goto release;
}