mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacmn: Free buffer in ath_procfs_diag_read
A read buffer is allocated and used in ath_procfs_diag_read and it is not freed in one exit path which causes a memory leak Free read buffer in all exit paths of ath_procfs_diag_read Change-Id: I1b2446a99f53c2f9130d395dd316eb4649eb24db CRs-Fixed: 2352165
This commit is contained in:
parent
2a73379e03
commit
a3be364dfb
1 changed files with 3 additions and 1 deletions
|
|
@ -108,8 +108,10 @@ static ssize_t ath_procfs_diag_read(struct file *file, char __user *buf,
|
|||
}
|
||||
|
||||
out:
|
||||
if (rv)
|
||||
if (rv) {
|
||||
qdf_mem_free(read_buffer);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (copy_to_user(buf, read_buffer, count)) {
|
||||
qdf_mem_free(read_buffer);
|
||||
|
|
|
|||
Loading…
Reference in a new issue