Skip to content

Commit

Permalink
[ALSA] Fix seq_clientmgr dereferences before NULL check
Browse files Browse the repository at this point in the history
Modules: ALSA sequencer

cptr->pool must be non-NULL there, so just the if (cptr->pool) is
superfluous. Thanks Takashi.

Signed-off-by: Eugene Teo <eugene.teo@eugeneteo.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Eugene Teo authored and Jaroslav Kysela committed Mar 22, 2006
1 parent 825aa97 commit e64d2e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/core/seq/seq_clientmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_room = cptr->pool->room;
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) {
info.input_pool = cptr->data.user.fifo_pool_size;
info.input_free = info.input_pool;
Expand Down

0 comments on commit e64d2e3

Please sign in to comment.