mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
haven: Fix NULL pointer dereference in hh_rm_populate_mem_attr_desc()
Use the locally calculated value of memory attribute entries when populating the memory attribute descriptor, instead of always dereferencing the client provided memory attribute descriptor, as clients may not always provide one. Change-Id: Ifbe586336e69e439ed404067616cce7515fd7953 Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
17c22334d7
commit
2629a2e2f1
1 changed files with 1 additions and 1 deletions
|
|
@ -609,7 +609,7 @@ static void hh_rm_populate_mem_attr_desc(struct hh_mem_attr_desc *dst_desc,
|
|||
{
|
||||
u32 n_mem_attr_entries = src_desc ? src_desc->n_mem_attr_entries : 0;
|
||||
|
||||
dst_desc->n_mem_attr_entries = src_desc->n_mem_attr_entries;
|
||||
dst_desc->n_mem_attr_entries = n_mem_attr_entries;
|
||||
if (n_mem_attr_entries)
|
||||
memcpy(dst_desc->attr_entries, src_desc->attr_entries,
|
||||
sizeof(*dst_desc->attr_entries) * n_mem_attr_entries);
|
||||
|
|
|
|||
Loading…
Reference in a new issue