mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-07 13:30:07 -05:00
remove superfluous free() checks
free() correctly handles NULL pointers, so we can omit explicit checks for that condition.
This commit is contained in:
parent
45850439b3
commit
4433248bf3
33 changed files with 108 additions and 205 deletions
|
|
@ -607,10 +607,8 @@ int snd_mixer_close(snd_mixer_t *mixer)
|
|||
}
|
||||
assert(list_empty(&mixer->elems));
|
||||
assert(mixer->count == 0);
|
||||
if (mixer->pelems) {
|
||||
free(mixer->pelems);
|
||||
mixer->pelems = NULL;
|
||||
}
|
||||
free(mixer->pelems);
|
||||
mixer->pelems = NULL;
|
||||
while (!list_empty(&mixer->slaves)) {
|
||||
int err;
|
||||
snd_mixer_slave_t *s;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue