Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e4d77590 authored by Bao D. Nguyen's avatar Bao D. Nguyen
Browse files

scsi: ufs: Fix potential memory leak



The function ufs_read_device_desc_data() allocates some memory
for use in reading the device descriptor, but it fails to free
the memory when done. Add kfree() to fix the potential memory leak.
In addition, this change replaces the kstrdup() with devm_kzalloc()
so that the allocated memory is freed when the driver is unloaded.

Change-Id: Ib5daa516fcd8e93a2f8cfbe7058c97b673d4f133
Signed-off-by: default avatarBao D. Nguyen <nguyenb@codeaurora.org>
parent 679dfb32
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment