diff options
author | Eugene Teo <eugene.teo@eugeneteo.net> | 2006-03-17 10:32:17 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:39:23 -0500 |
commit | e64d2e36236175a56fd1d8b2acd784e21bdc7de6 (patch) | |
tree | e58d5a4e3f570aa46e66dc7d80ca524fc33d1b57 /sound/core | |
parent | 825aa97241b46d2819c1db984c86a1a9df41b8e1 (diff) |
[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: Eugene Teo <eugene.teo@eugeneteo.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/seq/seq_clientmgr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c index aae6420f5948..bb15d9ee8842 100644 --- a/sound/core/seq/seq_clientmgr.c +++ b/sound/core/seq/seq_clientmgr.c | |||
@@ -1866,8 +1866,7 @@ static int snd_seq_ioctl_get_client_pool(struct snd_seq_client *client, | |||
1866 | info.output_pool = cptr->pool->size; | 1866 | info.output_pool = cptr->pool->size; |
1867 | info.output_room = cptr->pool->room; | 1867 | info.output_room = cptr->pool->room; |
1868 | info.output_free = info.output_pool; | 1868 | info.output_free = info.output_pool; |
1869 | if (cptr->pool) | 1869 | info.output_free = snd_seq_unused_cells(cptr->pool); |
1870 | info.output_free = snd_seq_unused_cells(cptr->pool); | ||
1871 | if (cptr->type == USER_CLIENT) { | 1870 | if (cptr->type == USER_CLIENT) { |
1872 | info.input_pool = cptr->data.user.fifo_pool_size; | 1871 | info.input_pool = cptr->data.user.fifo_pool_size; |
1873 | info.input_free = info.input_pool; | 1872 | info.input_free = info.input_pool; |