summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-05-05 21:08:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-18 17:01:46 +0200
commit9434cec130a941e8a0698d598dfa5499dbdeb949 (patch)
tree144ae9078e32df6662652778621ae439c3677ad0 /drivers/usb/host/xhci-mem.c
parentb299cde245b0b76c977f4291162cf668e087b408 (diff)
downloadlinux-9434cec130a941e8a0698d598dfa5499dbdeb949.tar.bz2
firmware: Google VPD: Fix memory allocation error handling
This patch fixes several issues: - if the 1st 'kzalloc' fails, we dereference a NULL pointer - if the 2nd 'kzalloc' fails, there is a memory leak - if 'sysfs_create_bin_file' fails there is also a memory leak Fix it by adding a test after the first memory allocation and some error handling paths to correctly free memory if needed. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
0 files changed, 0 insertions, 0 deletions