From: kn Date: Wed, 20 Jul 2022 21:03:10 +0000 (+0000) Subject: Add size to free(9) call X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c1a1ba6c92ae8275e1649e4b7be93ec176340c72;p=openbsd Add size to free(9) call Without any later realloactions, size is taken from vnet_dring_alloc(). OK kettenis --- diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c index 120f9cd8c09..694864fbad0 100644 --- a/sys/arch/sparc64/dev/vnet.c +++ b/sys/arch/sparc64/dev/vnet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnet.c,v 1.64 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: vnet.c,v 1.65 2022/07/20 21:03:10 kn Exp $ */ /* * Copyright (c) 2009, 2015 Mark Kettenis * @@ -1535,5 +1535,5 @@ vnet_dring_free(bus_dma_tag_t t, struct vnet_dring *vd) bus_dmamem_unmap(t, (caddr_t)vd->vd_desc, size); bus_dmamem_free(t, &vd->vd_seg, 1); bus_dmamap_destroy(t, vd->vd_map); - free(vd, M_DEVBUF, 0); + free(vd, M_DEVBUF, sizeof(*vd)); }