Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix a memory leak in an extremely uncommon error...



details:   https://anonhg.NetBSD.org/src/rev/a48db53a8a02
branches:  trunk
changeset: 370628:a48db53a8a02
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Sep 21 20:23:56 2022 +0000

description:
Fix a memory leak in an extremely uncommon error path in ste_start().

diffstat:

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

diffs (26 lines):

diff -r ec41d5283827 -r a48db53a8a02 sys/dev/pci/if_ste.c
--- a/sys/dev/pci/if_ste.c      Wed Sep 21 20:21:16 2022 +0000
+++ b/sys/dev/pci/if_ste.c      Wed Sep 21 20:23:56 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ste.c,v 1.62 2020/03/15 22:20:31 thorpej Exp $      */
+/*     $NetBSD: if_ste.c,v 1.63 2022/09/21 20:23:56 thorpej Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.62 2020/03/15 22:20:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.63 2022/09/21 20:23:56 thorpej Exp $");
 
 
 #include <sys/param.h>
@@ -722,6 +722,7 @@
                                printf("%s: unable to load Tx buffer, "
                                    "error = %d\n", device_xname(sc->sc_dev),
                                    error);
+                               m_freem(m);
                                break;
                        }
                }



Home | Main Index | Thread Index | Old Index