summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2020-01-04 16:56:49 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-27 17:37:27 +0200
commit008708152ebb229c29e065135599984fa9c4a51c (patch)
treebd870d8e8afbe6f2cf9664ab315820ae14a6a959 /security
parenta612c4ece2eb757011ae88a8410b48e523220b8d (diff)
KVM: SVM: Fix potential memory leak in svm_cpu_init()
commit d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 upstream. When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions