Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Memory leak. Same as r1.93. I don't know why Bra...



details:   https://anonhg.NetBSD.org/src/rev/6311dcd12a37
branches:  trunk
changeset: 809637:6311dcd12a37
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Jul 25 08:36:44 2015 +0000

description:
Memory leak. Same as r1.93. I don't know why Brainy didn't detect it
earlier; or perhaps I forgot to report it.

Found by Brainy.

diffstat:

 sys/dev/pci/if_ti.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 4875fc1b7ccf -r 6311dcd12a37 sys/dev/pci/if_ti.c
--- a/sys/dev/pci/if_ti.c       Sat Jul 25 07:12:30 2015 +0000
+++ b/sys/dev/pci/if_ti.c       Sat Jul 25 08:36:44 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.94 2015/04/27 17:41:26 christos Exp $ */
+/* $NetBSD: if_ti.c,v 1.95 2015/07/25 08:36:44 maxv Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.94 2015/04/27 17:41:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.95 2015/07/25 08:36:44 maxv Exp $");
 
 #include "opt_inet.h"
 
@@ -800,6 +800,7 @@
                                BUS_DMA_READ|BUS_DMA_NOWAIT)) != 0) {
                        aprint_error_dev(sc->sc_dev, "can't load recv map, error = %d\n",
                               error);
+                       m_freem(m_new);
                        return (ENOMEM);
                }
        } else {



Home | Main Index | Thread Index | Old Index