mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
Merge "msm: kgsl: Free the memory allocated for pages array in failure case"
This commit is contained in:
commit
52838777d3
1 changed files with 2 additions and 0 deletions
|
|
@ -1170,6 +1170,7 @@ static int kgsl_alloc_secure_pages(struct kgsl_device *device,
|
|||
sgt = kzalloc(sizeof(*sgt), GFP_KERNEL);
|
||||
if (!sgt) {
|
||||
kgsl_pool_free_pages(pages, count);
|
||||
kvfree(pages);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
@ -1177,6 +1178,7 @@ static int kgsl_alloc_secure_pages(struct kgsl_device *device,
|
|||
if (ret) {
|
||||
kfree(sgt);
|
||||
kgsl_pool_free_pages(pages, count);
|
||||
kvfree(pages);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue