Module Name: src
Committed By: macallan
Date: Sat Apr 4 14:12:40 UTC 2015
Modified Files:
src/sys/arch/sgimips/dev: scn.c
Log Message:
don't malloc a tiny, fixed size buffer to scribble into, then not use it
and never free it either
found by Brainy
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sgimips/dev/scn.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/sgimips/dev/scn.c
diff -u src/sys/arch/sgimips/dev/scn.c:1.7 src/sys/arch/sgimips/dev/scn.c:1.8
--- src/sys/arch/sgimips/dev/scn.c:1.7 Fri Jul 25 08:10:34 2014
+++ src/sys/arch/sgimips/dev/scn.c Sat Apr 4 14:12:40 2015
@@ -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 sel
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 sel
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