]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: core: Fix possible memory leaks at error path in info.c
authorTakashi Iwai <tiwai@suse.de>
Wed, 22 Apr 2015 15:54:25 +0000 (17:54 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 23 Apr 2015 15:11:23 +0000 (17:11 +0200)
commit2106a23e277262d6b0f0dc7cf406b6cc5bf12b84
tree086f8d3bb6ad0998d66830b2301d749907459867
parent65a6f402304ad8d5be0ff1028f786fe12c58e1ce
ALSA: core: Fix possible memory leaks at error path in info.c

Currently, snd_info_init() just returns an error without releasing the
previously assigned resources at error path.  The assigned proc and
info entries have to be released properly.  This patch covers it.

While we are at it, refactor the code a bit, too.

Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/info.c