From patchwork Fri Jan 22 06:18:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 74481 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0M6HdvU014735 for ; Fri, 22 Jan 2010 06:17:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751526Ab0AVGRi (ORCPT ); Fri, 22 Jan 2010 01:17:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751518Ab0AVGRh (ORCPT ); Fri, 22 Jan 2010 01:17:37 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:49293 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751181Ab0AVGRh (ORCPT ); Fri, 22 Jan 2010 01:17:37 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 155EE170044; Fri, 22 Jan 2010 14:17:35 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o0M6H4Jm030962; Fri, 22 Jan 2010 14:17:04 +0800 Received: from [10.167.141.76] (unknown [10.167.141.76]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 855D1D4744; Fri, 22 Jan 2010 14:18:42 +0800 (CST) Message-ID: <4B594347.2010904@cn.fujitsu.com> Date: Fri, 22 Jan 2010 14:18:47 +0800 From: Wei Yongjun User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: kvm@vger.kernel.org, Avi Kivity Subject: [PATCH 1/2] KVM: x86: Fix probable memory leak of vcpu->arch.mce_banks Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f25b52e..1ddcad4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5089,6 +5089,7 @@ fail: void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) { + kfree(vcpu->arch.mce_banks); kvm_free_lapic(vcpu); down_read(&vcpu->kvm->slots_lock); kvm_mmu_destroy(vcpu);