]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ALSA: synth: missing check for possible NULL after the call to kstrdup
authorAustin Kim <austin.kim@lge.com>
Tue, 9 Nov 2021 00:37:42 +0000 (00:37 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 13 Jan 2022 17:41:48 +0000 (18:41 +0100)
commit000eb0058cb1888df54b4849cab9cd84496f30b9
tree97ca6436d1243d0365e9bb23a8e8300b143a49ac
parent60246e4e0577721a732544916757cc5e9ea9d23f
ALSA: synth: missing check for possible NULL after the call to kstrdup

BugLink: https://bugs.launchpad.net/bugs/1953387
commit d159037abbe3412285c271bdfb9cdf19e62678ff upstream.

If kcalloc() return NULL due to memory starvation, it is possible for
kstrdup() to return NULL in similar case. So add null check after the call
to kstrdup() is made.

[ minor coding-style fix by tiwai ]

Signed-off-by: Austin Kim <austin.kim@lge.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211109003742.GA5423@raspberrypi
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
sound/synth/emux/emux.c