Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/cxgb There are two memory leaks here, found by m...
details: https://anonhg.NetBSD.org/src/rev/fe78eba159e1
branches: trunk
changeset: 348239:fe78eba159e1
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Oct 11 12:53:56 2016 +0000
description:
There are two memory leaks here, found by mootja; just add some XXXs.
diffstat:
sys/dev/pci/cxgb/cxgb_l2t.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 45c3dbf236f8 -r fe78eba159e1 sys/dev/pci/cxgb/cxgb_l2t.c
--- a/sys/dev/pci/cxgb/cxgb_l2t.c Tue Oct 11 12:32:30 2016 +0000
+++ b/sys/dev/pci/cxgb/cxgb_l2t.c Tue Oct 11 12:53:56 2016 +0000
@@ -28,7 +28,7 @@
***************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cxgb_l2t.c,v 1.3 2014/03/25 16:19:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cxgb_l2t.c,v 1.4 2016/10/11 12:53:56 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -127,7 +127,7 @@
memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac));
m_set_priority(m, CPL_PRIORITY_CONTROL);
while (e->arpq_head) {
- m = e->arpq_head;
+ m = e->arpq_head; /* XXX XXX XXX: Memory leak? */
e->arpq_head = m->m_next;
m->m_next = NULL;
}
@@ -182,6 +182,7 @@
arpq_enqueue(e, m);
mtx_unlock(&e->lock);
+ /* XXX XXX XXX: Memory leak? */
if ((m0 = m_gethdr(M_NOWAIT, MT_DATA)) == NULL)
return (ENOMEM);
/*
Home |
Main Index |
Thread Index |
Old Index