]> Git Repo - linux.git/commit
ALSA: hda: fix potential memleak in 'add_widget_node'
authorYe Bin <[email protected]>
Thu, 10 Nov 2022 14:45:39 +0000 (22:45 +0800)
committerTakashi Iwai <[email protected]>
Thu, 10 Nov 2022 14:28:12 +0000 (15:28 +0100)
commit9a5523f72bd2b0d66eef3d58810c6eb7b5ffc143
tree95e0f4d07b7317848f25af774767b70a6aed2915
parent9736a325137b62499d2b4be3fc2d742b131f75da
ALSA: hda: fix potential memleak in 'add_widget_node'

As 'kobject_add' may allocated memory for 'kobject->name' when return error.
And in this function, if call 'kobject_add' failed didn't free kobject.
So call 'kobject_put' to recycling resources.

Signed-off-by: Ye Bin <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
sound/hda/hdac_sysfs.c
This page took 0.048877 seconds and 4 git commands to generate.