Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/fdt Memory leak, found by mootja; not tested, but ob...
details: https://anonhg.NetBSD.org/src/rev/d4f452431d01
branches: trunk
changeset: 348327:d4f452431d01
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Oct 15 08:30:42 2016 +0000
description:
Memory leak, found by mootja; not tested, but obvious enough
diffstat:
sys/dev/fdt/fdt_gpio.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r cd0e444a0b6b -r d4f452431d01 sys/dev/fdt/fdt_gpio.c
--- a/sys/dev/fdt/fdt_gpio.c Sat Oct 15 07:10:15 2016 +0000
+++ b/sys/dev/fdt/fdt_gpio.c Sat Oct 15 08:30:42 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_gpio.c,v 1.3 2015/12/22 22:19:07 jmcneill Exp $ */
+/* $NetBSD: fdt_gpio.c,v 1.4 2016/10/15 08:30:42 maxv Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_gpio.c,v 1.3 2015/12/22 22:19:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_gpio.c,v 1.4 2016/10/15 08:30:42 maxv Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -111,6 +111,7 @@
gp->gp_priv = gc->gc_funcs->acquire(gc->gc_dev, data, len, flags);
if (gp->gp_priv == NULL) {
kmem_free(data, len);
+ kmem_free(gp, sizeof(*gp));
return NULL;
}
Home |
Main Index |
Thread Index |
Old Index