mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -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
|
|
@ -362,8 +362,7 @@ static int snd_pcm_dsnoop_close(snd_pcm_t *pcm)
|
|||
snd_pcm_direct_client_discard(dsnoop);
|
||||
snd_pcm_direct_shm_discard(dsnoop);
|
||||
snd_pcm_direct_semaphore_up(dsnoop, DIRECT_IPC_SEM_CLIENT);
|
||||
if (dsnoop->bindings)
|
||||
free(dsnoop->bindings);
|
||||
free(dsnoop->bindings);
|
||||
pcm->private_data = NULL;
|
||||
free(dsnoop);
|
||||
return 0;
|
||||
|
|
@ -636,8 +635,7 @@ int snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
|
|||
snd_pcm_direct_semaphore_up(dsnoop, DIRECT_IPC_SEM_CLIENT);
|
||||
_err_nosem:
|
||||
if (dsnoop) {
|
||||
if (dsnoop->bindings)
|
||||
free(dsnoop->bindings);
|
||||
free(dsnoop->bindings);
|
||||
free(dsnoop);
|
||||
}
|
||||
if (pcm)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue