Skip to content
Commit 3a554371 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: proc: Avoid possible leaks of snd_info_entry objects



This patch changes the parent pointer assignment of snd_info_entry
object to be always non-NULL.  More specifically,check the parent
argument in snd_info_create_module_entry() & co, and assign
snd_proc_root if NULL is passed there.

This assures that the proc object is always freed when the root is
freed, so avoid possible memory leaks.  For example, some error paths
(e.g. snd_info_register() error at snd_minor_info_init()) may leave
snd_info_entry object although the proc file itself is freed.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 480e32eb
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