ASoC: wcd9xxx: set pointer to null after kfree
In wcd core drivers, some pointers are not set as NULL after the memory is freed, which will leave many dangling pointers. Set them to NULL explicitly to avoid potential risk. CRs-Fixed: 997062 Change-Id: I5dd4a9dd8f757d0850d75575d7e522e2a22f46f3 Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
parent
59ff3301d5
commit
115b1e7c4e
1 changed files with 1 additions and 0 deletions
|
@ -741,6 +741,7 @@ static int wcd9xxx_irq_remove(struct platform_device *pdev)
|
|||
wmb();
|
||||
irq_domain_remove(data->domain);
|
||||
kfree(data);
|
||||
domain->host_data = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue