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/8e8418ba223c
branches:  trunk
changeset: 459725:8e8418ba223c
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 2df959c45dc4 -r 8e8418ba223c 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