Module Name: src
Committed By: bouyer
Date: Sun Oct 20 11:37:53 UTC 2013
Modified Files:
src/sys/arch/xen/xen: xennetback_xenbus.c
Log Message:
Fix memory leak if the provided mac address isn't valid.
To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/xen/xen/xennetback_xenbus.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/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.51 src/sys/arch/xen/xen/xennetback_xenbus.c:1.52
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.51 Wed Mar 6 11:37:23 2013
+++ src/sys/arch/xen/xen/xennetback_xenbus.c Sun Oct 20 11:37:53 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: xennetback_xenbus.c,v 1.51 2013/03/06 11:37:23 yamt Exp $ */
+/* $NetBSD: xennetback_xenbus.c,v 1.52 2013/10/20 11:37:53 bouyer Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.51 2013/03/06 11:37:23 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.52 2013/10/20 11:37:53 bouyer Exp $");
#include "opt_xen.h"
@@ -288,6 +288,7 @@ xennetback_xenbus_create(struct xenbus_d
if ((e[0] == '\0' && i != 5) && e[0] != ':') {
aprint_error_ifnet(ifp,
"%s is not a valid mac address\n", val);
+ free(val, M_DEVBUF);
err = EINVAL;
goto fail;
}