From: kettenis Date: Fri, 12 Jan 2018 14:53:37 +0000 (+0000) Subject: Use correct size in allocarray() call. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=75baf936b70b650e9ce92f91ae0e75591cf69497;p=openbsd Use correct size in allocarray() call. ok patrick@ --- diff --git a/sys/arch/arm64/dev/ampintc.c b/sys/arch/arm64/dev/ampintc.c index 6e5fecf0ec2..7bf7add2b6a 100644 --- a/sys/arch/arm64/dev/ampintc.c +++ b/sys/arch/arm64/dev/ampintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ampintc.c,v 1.9 2017/04/30 16:45:45 mpi Exp $ */ +/* $OpenBSD: ampintc.c,v 1.10 2018/01/12 14:53:37 kettenis Exp $ */ /* * Copyright (c) 2007,2009,2011 Dale Rahn * @@ -727,7 +727,7 @@ ampintc_msi_attach(struct device *parent, struct device *self, void *aux) printf(": nspi %d\n", sc->sc_nspi); - sc->sc_spi = mallocarray(sc->sc_nspi, sizeof(int), M_DEVBUF, + sc->sc_spi = mallocarray(sc->sc_nspi, sizeof(void *), M_DEVBUF, M_WAITOK|M_ZERO); sc->sc_ic.ic_node = faa->fa_node;