Received: by 10.223.164.202 with SMTP id h10csp3923174wrb; Mon, 20 Nov 2017 07:10:47 -0800 (PST) X-Google-Smtp-Source: AGs4zMZLzTvNUqPqlXrejTrOSiYr1nFS1xPGEJNifA/zIHWUmp3LYun5sQ+0x3lpds5OopMLeHFt X-Received: by 10.159.194.1 with SMTP id x1mr14417238pln.48.1511190647683; Mon, 20 Nov 2017 07:10:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511190647; cv=none; d=google.com; s=arc-20160816; b=YvXaUwiorJyzYI8+ZkzapGd+EFmniRheGPr/0FVyCvdjtyRHEB1JojB0Ist3fP5ST/ h0ai3l5d/WtpAUERQq8LxJQwH5n+NYR8fWKbMPnaYJoyfanTv5AztY45NFcf5Ren/+Lw qQhMiahS3izkyap49FRcxLMyNQIu/5ggjJEZMd40ZPg7ma0nD2A9K4HKBLxxySl8Q6GT wqE783In1ZzhFlpUwkOZPghr+yTFNhKDHh/65JcQr8uLVdnPz4lTpVmz98rYwfeAYKJW d1k4I6k+iNEldhiOkclEegi3qU5BKkCuLo1CyU9r6+yECpXVhGNFWJjWrscGZnk5JBGl blgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=h/ZZ3JRDnLuTiQTtaYdqYLPDRvwdfykYl86LrC3jIjE=; b=fiT53tjA+ULaf6xeZph3hbLDTg5Ls5BO5e+wZ+3BLe0qhzCq0y5uWkL0vD3Yorz3KW WOgkHLR3BuiIUUmDFCY22nGYpVljYIHybmk50bGCm2JuboiZukHGlkGOMb8r9/kMb6jF QJ8dIhM/3kGmTmRqXyj1r6LsfYTPDeU/qDxFPM+3+w5dfZ5YC9lf+/xmGSy1tY5kZQSq E6U8opQxdUhd5s/ShP2wv0qQEJgjd3kHhjB80syNVoLQmIHz4EDNt0x/JfLzI1W/DMyz mLNEVpkolSBLF/4Tw00jr3G+q/4oi7ucO0v+LFcwpAexdAmnZwkEyTq56eH55gjb33Od s57A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pJxD3JEI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s187si8372531pgc.532.2017.11.20.07.10.37; Mon, 20 Nov 2017 07:10:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pJxD3JEI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751365AbdKTPJw (ORCPT + 66 others); Mon, 20 Nov 2017 10:09:52 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:32847 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbdKTPJu (ORCPT ); Mon, 20 Nov 2017 10:09:50 -0500 Received: by mail-io0-f193.google.com with SMTP id i184so8621554ioa.0; Mon, 20 Nov 2017 07:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=h/ZZ3JRDnLuTiQTtaYdqYLPDRvwdfykYl86LrC3jIjE=; b=pJxD3JEIy3O1qSLeqnGfaHoPu0nlONVlOcz8HHbP9RsrFUZiJSIrYSAjV7IoFmzeC9 pqlYL01qX9gnky+6JSoxCHT4myD03CpmssVvPrDz3lLlD0NnOixg8Hew4w3k7GneSnmM OMULBwpBUDOKvVZHTnxMmpcz0AkoS0xkPzdkjPja9aOCR5HVyKdYoCK4Zo5EpyKGZ0uq 7Kh4gtR+4Uta3JE5MSE1TVvPebIl/wra2wtujFhTMLfAzJFFIAzckBjH6DN9c3990UlC s3W/1CGxVf1ohhqGuNv2NX4CMMDX+BVpl0e8JnWoR+KRyl33uR1IsjiRNQaU5eHioVLy Ea+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=h/ZZ3JRDnLuTiQTtaYdqYLPDRvwdfykYl86LrC3jIjE=; b=OLdSO4JVCwbeXT736vewgUrmqUMZ3iJFXZFsYsDreg2eJ26wF22pTAGgFzH5htKh20 c3qRQGjXMuPcMMQGoYolPR/pxTnPlWUTghkWbBwU5N8pmhlm/Drp7MFqaX50EsqRnhLr rW0FR7WO5kfCRIg6/IQJvD6xu/ailmpy3PTmE8pRGzbAaexI4M+g8oetLKOft8yV0QQc FnMCjPVHFCZVU5qBeWWcTmfWqdcJB8JhGlu29qAs4DCcr1H/M7nGqlzkB42VB9WcBNkl G+Fr0ib7n/yBRFHgYHYyOvud/OGVrU2FFDA2D5Y+OXx7pZHHx1g3RVyqiFSgiKK/f+TX ug8w== X-Gm-Message-State: AJaThX7aHqVVjqAht+kAEY0pd2cwMNf+DKkCo2lcrFnuVLMbRpCKLHrJ QUxX9IUM2qg8NkYBQzmeVy23hy8ZM8lq7zh0RrA= X-Received: by 10.107.141.78 with SMTP id p75mr15294306iod.165.1511190589619; Mon, 20 Nov 2017 07:09:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.96.40 with HTTP; Mon, 20 Nov 2017 07:09:48 -0800 (PST) In-Reply-To: <20171118134545.25784-1-christophe.jaillet@wanadoo.fr> References: <20171118134545.25784-1-christophe.jaillet@wanadoo.fr> From: PrasannaKumar Muralidharan Date: Mon, 20 Nov 2017 20:39:48 +0530 Message-ID: Subject: Re: [PATCH] crypto: hifn_795x - Fix a memory leak in the error handling path of 'hifn_probe()' To: Christophe JAILLET Cc: Herbert Xu , "David S . Miller" , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , open list , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christophe, On 18 November 2017 at 19:15, Christophe JAILLET wrote: > 'dev' is leaking in the error handling path of 'hifn_probe()'. > > Add a 'kfree(dev)' to match the code in 'hifn_remove()' > > Signed-off-by: Christophe JAILLET > --- > drivers/crypto/hifn_795x.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c > index e09d4055b19e..a5a36fe7bf2c 100644 > --- a/drivers/crypto/hifn_795x.c > +++ b/drivers/crypto/hifn_795x.c > @@ -2579,6 +2579,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) > for (i = 0; i < 3; ++i) > if (dev->bar[i]) > iounmap(dev->bar[i]); > + kfree(dev); > > err_out_free_regions: > pci_release_regions(pdev); > -- > 2.14.1 > Nice catch. Reviewed-by: PrasannaKumar Muralidharan Regards, PrasannaKumar From 1584465990457641371@xxx Sun Nov 19 04:08:40 +0000 2017 X-GM-THRID: 1584465990457641371 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread