diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-15 01:18:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-15 01:18:56 -0400 |
commit | d0ff9348810c5bc9fc7a3f022bdfae9b44b62f00 (patch) | |
tree | 36b638024e87545a83c63d2fb9bece4af692d5aa /sound | |
parent | d58c6ff0b779c5adae2a8596fde69cb45f2a5d68 (diff) | |
parent | dd6c5cd8fedddc9605209098e2fa4e82c7af22aa (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS fixes from Al Viro:
"Several fixes + obvious cleanup (you've missed a couple of open-coded
can_lookup() back then)"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
snd_pcm_link(): fix a leak...
use can_lookup() instead of direct checks of ->i_op->lookup
move exit_task_namespaces() outside of exit_notify()
fput: task_work_add() can fail if the caller has passed exit_task_work()
ncpfs: fix rmdir returns Device or resource busy
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/pcm_native.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index ccfa383f1fda..f92818155958 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -1649,6 +1649,7 @@ static int snd_pcm_link(struct snd_pcm_substream *substream, int fd) | |||
1649 | } | 1649 | } |
1650 | if (!snd_pcm_stream_linked(substream)) { | 1650 | if (!snd_pcm_stream_linked(substream)) { |
1651 | substream->group = group; | 1651 | substream->group = group; |
1652 | group = NULL; | ||
1652 | spin_lock_init(&substream->group->lock); | 1653 | spin_lock_init(&substream->group->lock); |
1653 | INIT_LIST_HEAD(&substream->group->substreams); | 1654 | INIT_LIST_HEAD(&substream->group->substreams); |
1654 | list_add_tail(&substream->link_list, &substream->group->substreams); | 1655 | list_add_tail(&substream->link_list, &substream->group->substreams); |
@@ -1663,8 +1664,7 @@ static int snd_pcm_link(struct snd_pcm_substream *substream, int fd) | |||
1663 | _nolock: | 1664 | _nolock: |
1664 | snd_card_unref(substream1->pcm->card); | 1665 | snd_card_unref(substream1->pcm->card); |
1665 | fput_light(file, fput_needed); | 1666 | fput_light(file, fput_needed); |
1666 | if (res < 0) | 1667 | kfree(group); |
1667 | kfree(group); | ||
1668 | return res; | 1668 | return res; |
1669 | } | 1669 | } |
1670 | 1670 | ||