diff options
author | Dongliang Mu <[email protected]> | 2023-03-09 12:01:05 +0800 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2023-03-20 13:11:55 +0100 |
commit | 4d5a2a7d2c97dbd658533eea5f79dab1ad5dc0ee (patch) | |
tree | 7442e6af2dc4cdf950842cfd3a0c1bd42ad4363b /tools/perf/scripts/python/export-to-postgresql.py | |
parent | da0ba0ccce54059d6c6b788a75099bfce95126da (diff) |
platform/x86/intel: tpmi: Fix double free in tpmi_create_device()
The previous commit 6a192c0cbf38 ("platform/x86/intel/tpmi: Fix
double free reported by Smatch") incorrectly handle the deallocation of
res variable. As shown in the comment, intel_vsec_add_aux handles all
the deallocation of res and feature_vsec_dev. Therefore, kfree(res) can
still cause double free if intel_vsec_add_aux returns error.
Fix this by adjusting the error handling part in tpmi_create_device,
following the function intel_vsec_add_dev.
Fixes: 6a192c0cbf38 ("platform/x86/intel/tpmi: Fix double free reported by Smatch")
Signed-off-by: Dongliang Mu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions