From patchwork Fri Jan 22 06:41:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 74485 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 o0M6eC4p017420 for ; Fri, 22 Jan 2010 06:40:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825Ab0AVGkF (ORCPT ); Fri, 22 Jan 2010 01:40:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751616Ab0AVGkF (ORCPT ); Fri, 22 Jan 2010 01:40:05 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:57405 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1751854Ab0AVGkD (ORCPT ); Fri, 22 Jan 2010 01:40:03 -0500 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 73349170121; Fri, 22 Jan 2010 14:39:59 +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 o0M6dT7M032108; Fri, 22 Jan 2010 14:39:29 +0800 Received: from [10.167.141.76] (unknown [10.167.141.76]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id C1A5DD4744; Fri, 22 Jan 2010 14:41:06 +0800 (CST) Message-ID: <4B594888.7050100@cn.fujitsu.com> Date: Fri, 22 Jan 2010 14:41:12 +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 v2] KVM: x86: Fix probable memory leak of vcpu->arch.mce_banks References: <4B594347.2010904@cn.fujitsu.com> In-Reply-To: <4B594347.2010904@cn.fujitsu.com> 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 56a90a6..c27ebb1 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5470,6 +5470,7 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) { int idx; + kfree(vcpu->arch.mce_banks); kvm_free_lapic(vcpu); idx = srcu_read_lock(&vcpu->kvm->srcu); kvm_mmu_destroy(vcpu);