Module Name:    src
Committed By:   christos
Date:           Mon Apr 27 17:38:01 UTC 2015

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

Log Message:
fix mbuf leak on failure (Brainy)


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/hifn7751.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/hifn7751.c
diff -u src/sys/dev/pci/hifn7751.c:1.57 src/sys/dev/pci/hifn7751.c:1.58
--- src/sys/dev/pci/hifn7751.c:1.57	Mon Apr 13 12:33:25 2015
+++ src/sys/dev/pci/hifn7751.c	Mon Apr 27 13:38:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: hifn7751.c,v 1.57 2015/04/13 16:33:25 riastradh Exp $	*/
+/*	$NetBSD: hifn7751.c,v 1.58 2015/04/27 17:38:01 christos Exp $	*/
 /*	$FreeBSD: hifn7751.c,v 1.5.2.7 2003/10/08 23:52:00 sam Exp $ */
 /*	$OpenBSD: hifn7751.c,v 1.140 2003/08/01 17:55:54 deraadt Exp $	*/
 
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.57 2015/04/13 16:33:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hifn7751.c,v 1.58 2015/04/27 17:38:01 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -3123,6 +3123,7 @@ hifn_mkmbuf_chain(int totlen, struct mbu
 		}
 		MCLGET(m, M_DONTWAIT);
 		if (!(m->m_flags & M_EXT)) {
+			m_freem(m);
 			m_freem(m0);
 			return (NULL);
 		}

Reply via email to