summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorSebastien Marie <semarie@cvs.openbsd.org>2015-08-12 08:04:21 +0000
committerSebastien Marie <semarie@cvs.openbsd.org>2015-08-12 08:04:21 +0000
commita6f4c5fb384a79e35f7b52e15f5218072183921e (patch)
tree9af78889e2c90f4242f66e88188e0216a8f5071f /sys/dev
parent810e51cfad94b8f4489cb0f7827866e418142773 (diff)
removes two mem leaks in ti (in error path).
one leak reported by Maxime Villard initial patch from Christian Schulte (with spelling corrections in comments) second leak corrected by myself ok kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/ti.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/ti.c b/sys/dev/ic/ti.c
index f7d4147327c..788f1d72578 100644
--- a/sys/dev/ic/ti.c
+++ b/sys/dev/ic/ti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ti.c,v 1.15 2015/06/24 09:40:54 mpi Exp $ */
+/* $OpenBSD: ti.c,v 1.16 2015/08/12 08:04:20 semarie Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -560,7 +560,7 @@ ti_handle_events(struct ti_softc *sc)
}
/*
- * Intialize a standard receive ring descriptor.
+ * Initialize a standard receive ring descriptor.
*/
int
ti_newbuf_std(struct ti_softc *sc, int i, struct mbuf *m,
@@ -620,7 +620,7 @@ ti_newbuf_std(struct ti_softc *sc, int i, struct mbuf *m,
}
/*
- * Intialize a mini receive ring descriptor. This only applies to
+ * Initialize a mini receive ring descriptor. This only applies to
* the Tigon 2.
*/
int
@@ -654,7 +654,7 @@ ti_newbuf_mini(struct ti_softc *sc, int i, struct mbuf *m,
if (bus_dmamap_load_mbuf(sc->sc_dmatag, dmamap, m_new,
BUS_DMA_NOWAIT)) {
- m_freem(m);
+ m_freem(m_new);
return (ENOBUFS);
}
} else {
@@ -712,7 +712,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int i, struct mbuf *m,
if (bus_dmamap_load_mbuf(sc->sc_dmatag, dmamap, m_new,
BUS_DMA_NOWAIT)) {
- m_freem(m);
+ m_freem(m_new);
return (ENOBUFS);
}
} else {