Module Name:    src
Committed By:   maxv
Date:           Mon Sep 23 06:50:04 UTC 2019

Modified Files:
        src/sys/dev/pci: if_jme.c

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

Found by the lgtm bot.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pci/if_jme.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_jme.c
diff -u src/sys/dev/pci/if_jme.c:1.45 src/sys/dev/pci/if_jme.c:1.46
--- src/sys/dev/pci/if_jme.c:1.45	Wed Aug  7 15:29:02 2019
+++ src/sys/dev/pci/if_jme.c	Mon Sep 23 06:50:04 2019
@@ -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 @@ jme_encap(struct jme_softc *sc, struct m
 			    "DMA segments, dropping...\n",
 			    device_xname(sc->jme_dev));
 			m_freem(*m_head);
-			m_head = NULL;
+			*m_head = NULL;
 		}
 		return (error);
 	}

Reply via email to