summaryrefslogtreecommitdiff
path: root/src/control/hcontrol.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2001-02-12 18:10:31 +0000
committerJaroslav Kysela <perex@perex.cz>2001-02-12 18:10:31 +0000
commit515d1a6415e8c1b3f87540186488c78fe954d0b5 (patch)
treeb478fb96e7b1fd412160ddbcd49a37496b1e3268 /src/control/hcontrol.c
parent6f3b01b79caa9b3df9223fed5ee13fa43fd8401e (diff)
Improved mixer sort/compare interface.
Diffstat (limited to 'src/control/hcontrol.c')
-rw-r--r--src/control/hcontrol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/control/hcontrol.c b/src/control/hcontrol.c
index 44938257..b7964d87 100644
--- a/src/control/hcontrol.c
+++ b/src/control/hcontrol.c
@@ -134,8 +134,10 @@ static int snd_hctl_elem_add(snd_hctl_t *hctl, snd_hctl_elem_t *elem)
snd_hctl_elem_t **h;
hctl->alloc += 32;
h = realloc(hctl->pelems, sizeof(*h) * hctl->alloc);
- if (!h)
+ if (!h) {
+ hctl->alloc -= 32;
return -ENOMEM;
+ }
hctl->pelems = h;
}
if (hctl->count == 0) {