Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/dev/pci Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/82a3dae937cc
branches:  netbsd-7
changeset: 799538:82a3dae937cc
user:      snj <snj%NetBSD.org@localhost>
date:      Tue Aug 04 21:14:49 2015 +0000

description:
Pull up following revision(s) (requested by maxv in ticket #913):
        sys/dev/pci/if_ti.c: revisions 1.94, 1.95
fix mbuf leak on failure (Brainy)
--
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 |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 211b32af5c37 -r 82a3dae937cc sys/dev/pci/if_ti.c
--- a/sys/dev/pci/if_ti.c       Tue Aug 04 21:03:33 2015 +0000
+++ b/sys/dev/pci/if_ti.c       Tue Aug 04 21:14:49 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.93 2014/03/29 19:28:25 christos Exp $ */
+/* $NetBSD: if_ti.c,v 1.93.4.1 2015/08/04 21:14:49 snj Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.93 2014/03/29 19:28:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.93.4.1 2015/08/04 21:14:49 snj Exp $");
 
 #include "opt_inet.h"
 
@@ -733,6 +733,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 {
@@ -799,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