Commit be17b04b authored by Dongliang Mu's avatar Dongliang Mu Committed by jiayingbao
Browse files

platform/x86/intel: vsec: Fix a memory leak in intel_vsec_add_aux

mainline inclusion
from mainline-v6.3-rc5
commit da0ba0cc
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8WOEC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=da0ba0ccce54059d6c6b788a75099bfce95126da



-------------------------------------

The first error handling code in intel_vsec_add_aux misses the
deallocation of intel_vsec_dev->resource.

Fix this by adding kfree(intel_vsec_dev->resource) in the error handling
code.

Intel-SIG: commit da0ba0cc platform/x86/intel: vsec: Fix a memory leak in intel_vsec_add_aux.
Backport Intel_vsec bus update as TPMI driver dependency.

Reviewed-by: default avatarDavid E. Box <david.e.box@linux.intel.com>
Signed-off-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230309040107.534716-4-dzm91@hust.edu.cn


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
[ Yingbao Jia: amend commit log ]
Signed-off-by: default avatarYingbao Jia <yingbao.jia@intel.com>
parent 3a27bbb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment