From 204cdd3fbe5dc2828adcd3aeb44cf808d4c65579 Mon Sep 17 00:00:00 2001 From: maxv Date: Sun, 28 Jun 2015 09:15:45 +0000 Subject: [PATCH] Use-after-free. ok christos@ Found by The Brainy Code Scanner. --- sys/arch/pmax/tc/dt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arch/pmax/tc/dt.c b/sys/arch/pmax/tc/dt.c index 5be6e7696782..ceaf013fc4eb 100644 --- a/sys/arch/pmax/tc/dt.c +++ b/sys/arch/pmax/tc/dt.c @@ -1,4 +1,4 @@ -/* $NetBSD: dt.c,v 1.11 2011/06/04 01:37:36 tsutsui Exp $ */ +/* $NetBSD: dt.c,v 1.12 2015/06/28 09:15:45 maxv Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ SOFTWARE. */ #include -__KERNEL_RCSID(0, "$NetBSD: dt.c,v 1.11 2011/06/04 01:37:36 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dt.c,v 1.12 2015/06/28 09:15:45 maxv Exp $"); #include #include @@ -225,6 +225,7 @@ dt_attach(device_t parent, device_t self, void *aux) if (sc->sc_sih == NULL) { printf("%s: memory exhausted\n", device_xname(self)); free(msg, M_DEVBUF); + return; } SIMPLEQ_INIT(&sc->sc_queue);