From 205dc317cfdbd96843bbba0ea3ffae6973948e25 Mon Sep 17 00:00:00 2001 From: macallan Date: Sat, 4 Apr 2015 14:12:40 +0000 Subject: don't malloc a tiny, fixed size buffer to scribble into, then not use it and never free it either found by Brainy --- sys/arch/sgimips/dev/scn.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sys') 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 -__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 -- cgit