aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-08-06 12:46:26 +0200
committerTakashi Iwai <tiwai@suse.de>2019-08-06 12:46:35 +0200
commitdae02c8c64937532466d95fdb6ead6ada8000673 (patch)
tree1aa28cc48c37996a7e75aceb5f2430b7f0305127 /sound/usb
parentALSA: firewire-lib: localize kernel APIs to start/stop each AMDTP stream (diff)
parentALSA: usb-audio: fix a memory leak bug (diff)
downloadlinux-dev-dae02c8c64937532466d95fdb6ead6ada8000673.tar.xz
linux-dev-dae02c8c64937532466d95fdb6ead6ada8000673.zip
Merge branch 'for-linus' into for-next
Pull 5.3 development branch for further fixes of USB-audio stuff. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/helper.c2
-rw-r--r--sound/usb/stream.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/sound/usb/helper.c b/sound/usb/helper.c
index 71d5f540334a..4c12cc5b53fd 100644
--- a/sound/usb/helper.c
+++ b/sound/usb/helper.c
@@ -72,7 +72,7 @@ int snd_usb_pipe_sanity_check(struct usb_device *dev, unsigned int pipe)
struct usb_host_endpoint *ep;
ep = usb_pipe_endpoint(dev, pipe);
- if (usb_pipetype(pipe) != pipetypes[usb_endpoint_type(&ep->desc)])
+ if (!ep || usb_pipetype(pipe) != pipetypes[usb_endpoint_type(&ep->desc)])
return -EINVAL;
return 0;
}
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index 7ee9d17d0143..e852c7fd6109 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -1043,6 +1043,7 @@ found_clock:
pd = kzalloc(sizeof(*pd), GFP_KERNEL);
if (!pd) {
+ kfree(fp->chmap);
kfree(fp->rate_table);
kfree(fp);
return NULL;