diff options
| author | macallan <macallan@NetBSD.org> | 2015-04-04 14:12:40 +0000 |
|---|---|---|
| committer | macallan <macallan@NetBSD.org> | 2015-04-04 14:12:40 +0000 |
| commit | 205dc317cfdbd96843bbba0ea3ffae6973948e25 (patch) | |
| tree | 652151cb6c91f37bea7a10a5eccaaaa9d716e9ab /sys | |
| parent | 85fcb0a4b9c486c18693698eabcbfd7c72bbbf4b (diff) | |
don't malloc a tiny, fixed size buffer to scribble into, then not use it
and never free it either
found by Brainy
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/sgimips/dev/scn.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/arch/sgimips/dev/scn.c b/sys/arch/sgimips/dev/scn.c index cf0ee1e116d..672563ffb61 100644 --- a/sys/arch/sgimips/dev/scn.c +++ b/sys/arch/sgimips/dev/scn.c @@ -1,4 +1,4 @@ -/* $NetBSD: scn.c,v 1.7 2014/07/25 08:10:34 dholland Exp $ */ +/* $NetBSD: scn.c,v 1.8 2015/04/04 14:12:40 macallan Exp $ */ /* * Resurrected from the old pc532 port 1/18/2009. @@ -92,7 +92,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.7 2014/07/25 08:10:34 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scn.c,v 1.8 2015/04/04 14:12:40 macallan Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -815,7 +815,6 @@ scn_attach(device_t parent, device_t self, void *aux) u_char mr1, mr2; enum scntype scntype = SCNUNK; const char *duart_type = "Unknown"; - char *intrname; bool console, first; devmajor_t major; @@ -906,9 +905,6 @@ scn_attach(device_t parent, device_t self, void *aux) ch_base[CH_MR] = mr2; splx(s); - intrname = malloc(sizeof("scnXX"), M_DEVBUF, M_NOWAIT); - snprintf(intrname, sizeof("scnXX"), "scn%d", unit); - /* * On IP6 the console chip is duart1. The keyboard/mouse * is duart0. Each chip has two channels and the channels |
