diff options
author | 2017-07-19 12:23:16 +0000 | |
---|---|---|
committer | 2017-07-19 12:23:16 +0000 | |
commit | a30d926be8e066042ea3e8d3a5715a7998e32f12 (patch) | |
tree | 750e09a32c396477672d7ee2a6ba3a94959e0e6d | |
parent | depend is dead (diff) | |
download | wireguard-openbsd-a30d926be8e066042ea3e8d3a5715a7998e32f12.tar.xz wireguard-openbsd-a30d926be8e066042ea3e8d3a5715a7998e32f12.zip |
Fix memory leak in iec_get(). If MCLGET fails free the mbuf as well.
Found by Ilja Van Sprundel
OK bluhm@ deraadt@
-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; |