iwlwifi: dbg_ini: fix memory leak in alloc_sgtable
In alloc_sgtable if alloc_page fails, the alocated table should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
committed by
Luca Coelho
parent
8188a18ee2
commit
b4b814fec1
@ -646,6 +646,7 @@ static struct scatterlist *alloc_sgtable(int size)
|
|||||||
if (new_page)
|
if (new_page)
|
||||||
__free_page(new_page);
|
__free_page(new_page);
|
||||||
}
|
}
|
||||||
|
kfree(table);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
alloc_size = min_t(int, size, PAGE_SIZE);
|
alloc_size = min_t(int, size, PAGE_SIZE);
|
||||||
|
Reference in New Issue
Block a user