mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
nvidia-oot: clear out the memory before freeing
Jira ESLC-8592 Change-Id: I0532bab29d4267477770f317576610514c25d4ea Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3356255 Reviewed-by: Suresh Venkatachalam <skathirampat@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
2483ab734d
commit
edd7b240b0
@@ -260,6 +260,8 @@ static int tegra_hv_vcpu_yield_remove(struct platform_device *pdev)
|
||||
device_destroy(vcpu_yield_class, vcpu_yield->dev);
|
||||
|
||||
}
|
||||
memset(vcpu_yield_dev_list, 0,
|
||||
vcpu_yield_pdev->vmid_count * sizeof(*vcpu_yield_dev_list));
|
||||
kfree(vcpu_yield_dev_list);
|
||||
}
|
||||
|
||||
@@ -272,6 +274,7 @@ static int tegra_hv_vcpu_yield_remove(struct platform_device *pdev)
|
||||
vcpu_yield_pdev->vcpu_yield_dev = 0;
|
||||
}
|
||||
|
||||
memset(vcpu_yield_pdev, 0, sizeof(*vcpu_yield_pdev));
|
||||
kfree(vcpu_yield_pdev);
|
||||
dev_set_drvdata(&pdev->dev, NULL);
|
||||
}
|
||||
@@ -449,6 +452,7 @@ static int tegra_hv_vcpu_yield_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
out:
|
||||
memset(dt_array_mem, 0, 3 * MAX_YIELD_VM_COUNT * sizeof(int));
|
||||
kfree(dt_array_mem);
|
||||
|
||||
if (result)
|
||||
|
||||
Reference in New Issue
Block a user