ANDROID: Fix access invalid addr because it is not initialized

The addr is not initialized, we may access a random value.

Fixes: dc5241048f ("ANDROID: vendor_hooks: Add hooks for reducing virtual address fragmentation")
Bug: 187259935
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I770bf5e69e6fcd4e1ccd3987b4891156892de758
This commit is contained in:
Liujie Xie 2021-05-26 10:31:17 +08:00 committed by Suren Baghdasaryan
commit 8c944335a3

View file

@ -2094,7 +2094,7 @@ static unsigned long unmapped_area_topdown(struct vm_unmapped_area_info *info)
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
unsigned long length, low_limit, high_limit, gap_start, gap_end;
unsigned long addr;
unsigned long addr = 0;
/* Adjust search length to account for worst case alignment overhead */
length = info->length + info->align_mask;