mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Improved mixer sort/compare interface.
This commit is contained in:
parent
6f3b01b79c
commit
515d1a6415
3 changed files with 70 additions and 18 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue