diff options
| author | Christophe JAILLET <[email protected]> | 2017-05-05 19:08:44 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2017-05-18 15:01:46 +0000 |
| commit | 9434cec130a941e8a0698d598dfa5499dbdeb949 (patch) | |
| tree | 144ae9078e32df6662652778621ae439c3677ad0 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
| parent | drivers: char: mem: Check for address space wraparound with mmap() (diff) | |
| download | kernel-9434cec130a941e8a0698d598dfa5499dbdeb949.tar.gz kernel-9434cec130a941e8a0698d598dfa5499dbdeb949.zip | |
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions
