Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci A * is missing here. This could cause a use-afte...



details:   https://anonhg.NetBSD.org/src/rev/ce1051d96231
branches:  trunk
changeset: 454615:ce1051d96231
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Sep 23 06:50:04 2019 +0000

description:
A * is missing here. This could cause a use-after-free.

Found by the lgtm bot.

diffstat:

 sys/dev/pci/if_jme.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b107ca9fd384 -r ce1051d96231 sys/dev/pci/if_jme.c
--- a/sys/dev/pci/if_jme.c      Mon Sep 23 05:54:31 2019 +0000
+++ b/sys/dev/pci/if_jme.c      Mon Sep 23 06:50:04 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_jme.c,v 1.45 2019/08/07 15:29:02 msaitoh Exp $      */
+/*     $NetBSD: if_jme.c,v 1.46 2019/09/23 06:50:04 maxv Exp $ */
 
 /*
  * Copyright (c) 2008 Manuel Bouyer.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.45 2019/08/07 15:29:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_jme.c,v 1.46 2019/09/23 06:50:04 maxv Exp $");
 
 
 #include <sys/param.h>
@@ -1453,7 +1453,7 @@
                            "DMA segments, dropping...\n",
                            device_xname(sc->jme_dev));
                        m_freem(*m_head);
-                       m_head = NULL;
+                       *m_head = NULL;
                }
                return (error);
        }



Home | Main Index | Thread Index | Old Index