diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2017-07-19 12:23:17 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2017-07-19 12:23:17 +0000 |
commit | 1b0c159808dfa19d683dc22e14f2506230ee502f (patch) | |
tree | 5ae8af57717de418e7ddb3aaa436d858b797eeb5 /sys/arch/sgi | |
parent | d3f11624b01614f93ec02f1043cb7d0c86627d91 (diff) |
Fix memory leak in iec_get(). If MCLGET fails free the mbuf as well.
Found by Ilja Van Sprundel
OK bluhm@ deraadt@
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/dev/if_iec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/sgi/dev/if_iec.c b/sys/arch/sgi/dev/if_iec.c index 2b590282e59..6408f16b62e 100644 --- a/sys/arch/sgi/dev/if_iec.c +++ b/sys/arch/sgi/dev/if_iec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iec.c,v 1.25 2017/02/11 14:40:06 visa Exp $ */ +/* $OpenBSD: if_iec.c,v 1.26 2017/07/19 12:23:16 claudio Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -1155,6 +1155,7 @@ iec_get(struct iec_softc *sc, uint8_t *data, size_t datalen) printf("%s: unable to allocate RX cluster\n", sc->sc_dev.dv_xname); m_freem(head); + m_freem(m); return NULL; } len = MCLBYTES; |