Commit e64d2e36 authored by Eugene Teo's avatar Eugene Teo Committed by Jaroslav Kysela

[ALSA] Fix seq_clientmgr dereferences before NULL check

Modules: ALSA sequencer

cptr->pool must be non-NULL there, so just the if (cptr->pool) is
superfluous. Thanks Takashi.
Signed-off-by: default avatarEugene Teo <eugene.teo@eugeneteo.net>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 825aa972
...@@ -1866,8 +1866,7 @@ static int snd_seq_ioctl_get_client_pool(struct snd_seq_client *client, ...@@ -1866,8 +1866,7 @@ static int snd_seq_ioctl_get_client_pool(struct snd_seq_client *client,
info.output_pool = cptr->pool->size; info.output_pool = cptr->pool->size;
info.output_room = cptr->pool->room; info.output_room = cptr->pool->room;
info.output_free = info.output_pool; info.output_free = info.output_pool;
if (cptr->pool) info.output_free = snd_seq_unused_cells(cptr->pool);
info.output_free = snd_seq_unused_cells(cptr->pool);
if (cptr->type == USER_CLIENT) { if (cptr->type == USER_CLIENT) {
info.input_pool = cptr->data.user.fifo_pool_size; info.input_pool = cptr->data.user.fifo_pool_size;
info.input_free = info.input_pool; info.input_free = info.input_pool;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment