From patchwork Sat Nov 19 18:22:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Lambert X-Patchwork-Id: 9438327 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4788760469 for ; Sat, 19 Nov 2016 18:26:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D1A1285D6 for ; Sat, 19 Nov 2016 18:26:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FEAF29234; Sat, 19 Nov 2016 18:26:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9B37285D6 for ; Sat, 19 Nov 2016 18:26:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753288AbcKSS0W (ORCPT ); Sat, 19 Nov 2016 13:26:22 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34785 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753118AbcKSS0T (ORCPT ); Sat, 19 Nov 2016 13:26:19 -0500 Received: by mail-wm0-f65.google.com with SMTP id g23so14969644wme.1; Sat, 19 Nov 2016 10:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=TFKDNlAvykieAK/VqNPDtStMGicE1iO+T5QDXFKW2Dk=; b=jm5HQWcLbYuTLu4QVMYJosBS5fZxHHen/JpG6wxUG6E12qBdr9l3RI97mi3LUfIEBG m69J7K4xhRskvmVgyskLCnKJdx06Y5EoQfABNhDK6pbPaMpPLeR3cqzGyyRjlaucQb1A GgkjB2DXmhP4YP3tRPh/Dz/Z+0AH7gEORLAhrGRcaQA3m25sYmr/hE3As7bv9JVsSC+8 15IQhYisBVRX4dYFwI2YcWKLd5emFl0EQ8o2lytVzmAoIh0PILc8eDdnd/fKfwLz97+J EViYcZ5OIJbrI2yYgp/3g6PbNiCpcVFwGGfUf5lKDzzkjcJGcb+ZdjsIvh0voyAT3zD5 cjUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TFKDNlAvykieAK/VqNPDtStMGicE1iO+T5QDXFKW2Dk=; b=mI2TONK6GADAFOBKT8MAyqqkWWGJ9WrViDbIuWPBYQLbguKOn3gwlU3Gv7iHN3PQox JIQwhzwiM48aMXPjJY1QYn4gfr31StbwQgxuFppDuiEw8sYp1GknHYYH2dkR6J6glJ5v NDBu40Dt8xs0pj1/dYtti/RxEoLjcgFD2wwyhmM37jbsDCQ7tqZTxBDuvWcOOsvMKaWk aCLG0U0mhsR91Rg8evmyly/vBmwgmOy2A4Favu/HUI4tc8DwsM8SBlkVZDQO6T/qL619 vF7vFYbqK93De2lSmyFe/LCf0du0YlniK/DJ20bnOTwfSJ3lCi6R/GYmRgdp00zdpZ/N 0jYQ== X-Gm-Message-State: AKaTC03cNnhjuijmFDuJ8AvQQYSKTTiSSahFinCiU5z0Dlv2mZKYXDbExUc43z2RPJpdGA== X-Received: by 10.28.15.138 with SMTP id 132mr4640722wmp.41.1479579977423; Sat, 19 Nov 2016 10:26:17 -0800 (PST) Received: from localhost.localdomain ([2a01:e35:8a86:9030:c685:8ff:fe2a:cb32]) by smtp.gmail.com with ESMTPSA id c81sm9926747wmf.22.2016.11.19.10.26.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Nov 2016 10:26:16 -0800 (PST) From: Quentin Lambert To: Juergen Gross , Boris Ostrovsky , David Vrabel , "James E.J. Bottomley" , "Martin K. Petersen" , xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: Quentin Lambert Subject: [PATCH] xen-scsifront: Add a missing call to kfree Date: Sat, 19 Nov 2016 19:22:56 +0100 Message-Id: <20161119182256.9081-1-lambert.quentin@gmail.com> X-Mailer: git-send-email 2.10.2 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Most error branches following the call to kmalloc contain a call to kfree. This patch add these calls where they are missing. This issue was found with Hector. Signed-off-by: Quentin Lambert Reviewed-by: Juergen Gross --- drivers/scsi/xen-scsifront.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/scsi/xen-scsifront.c +++ b/drivers/scsi/xen-scsifront.c @@ -627,6 +627,7 @@ static int scsifront_action_handler(stru if (scsifront_enter(info)) { spin_unlock_irq(host->host_lock); + kfree(shadow); return FAILED; }