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 an mbuf leak in the strict alignment case of...



details:   https://anonhg.NetBSD.org/src/rev/ea6b986995da
branches:  trunk
changeset: 472198:ea6b986995da
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Apr 24 22:09:56 1999 +0000

description:
Fix an mbuf leak in the strict alignment case of packet reception.

diffstat:

 sys/dev/pci/if_vr.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 1ae8f33fe2fa -r ea6b986995da sys/dev/pci/if_vr.c
--- a/sys/dev/pci/if_vr.c       Sat Apr 24 22:09:06 1999 +0000
+++ b/sys/dev/pci/if_vr.c       Sat Apr 24 22:09:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vr.c,v 1.19 1999/03/24 01:07:59 thorpej Exp $       */
+/*     $NetBSD: if_vr.c,v 1.20 1999/04/24 22:09:56 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -813,8 +813,10 @@
                }
                if (total_len > (MHLEN - 2)) {
                        MCLGET(m, M_DONTWAIT);
-                       if ((m->m_flags & M_EXT) == 0)
+                       if ((m->m_flags & M_EXT) == 0) {
+                               m_freem(m);
                                goto dropit;
+                       }
                }
                m->m_data += 2;
 



Home | Main Index | Thread Index | Old Index