diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2011-11-28 10:25:23 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2011-11-28 10:25:23 +0000 |
commit | e32f25b06ef8fe6699c549f5c85a17afc8ac7650 (patch) | |
tree | a59525b691c9f16c56a8105ac5e3fa2155b0ca08 /sys/dev | |
parent | b9e13515e5dd3bb0ee5f23fef430772ee2c2f6e8 (diff) |
Fix reversed error-handling gotos in myx_buf_fill(), which would lead to
either an mbuf leak or a NULL pointer dereference.
ok sthen@ claudio@ dlg@
testing claudio@ dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_myx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c index f15fe82af59..da0062c6d6f 100644 --- a/sys/dev/pci/if_myx.c +++ b/sys/dev/pci/if_myx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_myx.c,v 1.29 2011/08/08 01:30:25 dlg Exp $ */ +/* $OpenBSD: if_myx.c,v 1.30 2011/11/28 10:25:22 blambert Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org> @@ -1752,10 +1752,10 @@ myx_buf_fill(struct myx_softc *sc, int ring) return (mb); -mfree: - m_freem(m); put: myx_buf_put(&sc->sc_rx_buf_free[ring], mb); +mfree: + m_freem(m); return (NULL); } |