mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
pcm: remove extra NULL checks in snd_pcm_dmix_open()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
2fee6af9b6
commit
eb95cad4e2
1 changed files with 4 additions and 7 deletions
|
|
@ -998,7 +998,7 @@ int snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
|
||||||
snd_config_t *root, snd_config_t *sconf,
|
snd_config_t *root, snd_config_t *sconf,
|
||||||
snd_pcm_stream_t stream, int mode)
|
snd_pcm_stream_t stream, int mode)
|
||||||
{
|
{
|
||||||
snd_pcm_t *pcm = NULL, *spcm = NULL;
|
snd_pcm_t *pcm, *spcm = NULL;
|
||||||
snd_pcm_direct_t *dmix;
|
snd_pcm_direct_t *dmix;
|
||||||
int ret, first_instance;
|
int ret, first_instance;
|
||||||
|
|
||||||
|
|
@ -1154,12 +1154,9 @@ int snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
|
||||||
} else
|
} else
|
||||||
snd_pcm_direct_semaphore_up(dmix, DIRECT_IPC_SEM_CLIENT);
|
snd_pcm_direct_semaphore_up(dmix, DIRECT_IPC_SEM_CLIENT);
|
||||||
_err_nosem:
|
_err_nosem:
|
||||||
if (dmix) {
|
free(dmix->bindings);
|
||||||
free(dmix->bindings);
|
free(dmix);
|
||||||
free(dmix);
|
snd_pcm_free(pcm);
|
||||||
}
|
|
||||||
if (pcm)
|
|
||||||
snd_pcm_free(pcm);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue