Rwatson, write 100 times for tomorrow:

First unlock, then assign NULL to pointer.
This commit is contained in:
Poul-Henning Kamp 2004-06-27 21:54:34 +00:00
parent 52c583feb9
commit e3e244bff6

View File

@ -232,8 +232,8 @@ divert_packet(struct mbuf *m, int incoming)
if (sbappendaddr_locked(&sa->so_rcv,
(struct sockaddr *)&divsrc, m,
(struct mbuf *)0) == 0) {
sa = NULL; /* force mbuf reclaim below */
SOCKBUF_UNLOCK(&sa->so_rcv);
sa = NULL; /* force mbuf reclaim below */
} else
sorwakeup_locked(sa);
INP_UNLOCK(inp);