From patchwork Tue Oct 6 08:14:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Fedin X-Patchwork-Id: 7333671 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 77764BEEA4 for ; Tue, 6 Oct 2015 08:14:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A43922062B for ; Tue, 6 Oct 2015 08:14:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02B14205F5 for ; Tue, 6 Oct 2015 08:14:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751983AbbJFIOp (ORCPT ); Tue, 6 Oct 2015 04:14:45 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:50462 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751789AbbJFIOm (ORCPT ); Tue, 6 Oct 2015 04:14:42 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NVS00N3EHKG2780@mailout2.w1.samsung.com> for kvm@vger.kernel.org; Tue, 06 Oct 2015 09:14:40 +0100 (BST) X-AuditID: cbfec7f4-f79c56d0000012ee-2b-561382ef5c57 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 45.96.04846.FE283165; Tue, 6 Oct 2015 09:14:39 +0100 (BST) Received: from fedinw7x64.rnd.samsung.ru ([106.109.131.169]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NVS00JVSHKBUZ70@eusync2.samsung.com>; Tue, 06 Oct 2015 09:14:39 +0100 (BST) From: Pavel Fedin To: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: marc.zyngier@arm.com Subject: [PATCH] KVM: arm/arm64: Fix memory leak if timer initialization fails Date: Tue, 06 Oct 2015 11:14:35 +0300 Message-id: <1444119275-8972-1-git-send-email-p.fedin@samsung.com> X-Mailer: git-send-email 2.4.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDJMWRmVeSWpSXmKPExsVy+t/xK7rvm4TDDCYt0rWYM7XQ4uOp4+wW f+/8Y3Ng9lgzbw2jx/lNa5g9Pm+SC2CO4rJJSc3JLEst0rdL4Mp4Nf8Na8EKlorl206wNzAe Zu5i5OSQEDCR+DtvEROELSZx4d56ti5GLg4hgaWMEmtm3WEDSQgJtDFJbF2vAWKzCahLnP76 gQXEFhEwlXj+7y0riM0sICFx+v98MFtYwE+io2cOmM0ioCrx4uctsGW8Ak4SF88uYIVYJidx 5fp0tgmM3AsYGVYxiqaWJhcUJ6XnGuoVJ+YWl+al6yXn525ihPj5yw7GxcesDjEKcDAq8fBK 3BQKE2JNLCuuzD3EKMHBrCTC+5NLOEyINyWxsiq1KD++qDQntfgQozQHi5I479xd70OEBNIT S1KzU1MLUotgskwcnFINjJ5vtXjNhWTcmHXfvMg+xNh2nePW7d7EabXniooLKxInnjpftNvw XoDuj0YjxcOyFz8Erqg5t3ePmKaJ/YOTtVt442ZN5v9+bp7N66nsk3bNqj4R7R5vM5fzWPH+ bgE+v41lfbejFHad/zhn7oP7hzcuVbs/NYfhjWRZqKJl5en5uscLnx9eu0mJpTgj0VCLuag4 EQBRpa1g7wEAAA== Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Jump to correct label and free kvm_host_cpu_state Signed-off-by: Pavel Fedin Reviewed-by: Wei Huang --- arch/arm/kvm/arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index dc017ad..78b2869 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -1080,7 +1080,7 @@ static int init_hyp_mode(void) */ err = kvm_timer_hyp_init(); if (err) - goto out_free_mappings; + goto out_free_context; #ifndef CONFIG_HOTPLUG_CPU free_boot_hyp_pgd();