diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2019-05-08 15:33:42 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2019-05-08 15:33:42 +0000 |
commit | 13d24cad64570f879a5815857849def6a98d9e41 (patch) | |
tree | 5cdb206dd0621cd7c4b41794b6a15b4383ebb90d /sys/dev | |
parent | 94c3863af8000ec0c21633ffa1356af59aaf0e89 (diff) |
add free size, the old number of mixers, when reallocating.
ok deraadt mpi
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/azalia_codec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c index d8a9ba9eac8..e7c330757a6 100644 --- a/sys/dev/pci/azalia_codec.c +++ b/sys/dev/pci/azalia_codec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia_codec.c,v 1.173 2019/03/24 14:37:44 jcs Exp $ */ +/* $OpenBSD: azalia_codec.c,v 1.174 2019/05/08 15:33:41 tedu Exp $ */ /* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */ /*- @@ -1348,7 +1348,7 @@ azalia_mixer_ensure_capacity(codec_t *this, size_t newsize) return ENOMEM; } bcopy(this->mixers, newbuf, this->maxmixers * sizeof(mixer_item_t)); - free(this->mixers, M_DEVBUF, 0); + free(this->mixers, M_DEVBUF, this->maxmixers * sizeof(mixer_item_t)); this->mixers = newbuf; this->maxmixers = newmax; return 0; |