iwlwifi: dbg_ini: fix memory leak in alloc_sgtable
commit b4b814fec1a5a849383f7b3886b654a13abbda7d upstream. 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> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
67a8c1b6bc
commit
db1fb5a397
@ -532,6 +532,7 @@ static struct scatterlist *alloc_sgtable(int size)
|
||||
if (new_page)
|
||||
__free_page(new_page);
|
||||
}
|
||||
kfree(table);
|
||||
return NULL;
|
||||
}
|
||||
alloc_size = min_t(int, size, PAGE_SIZE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user