DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: "Kumar, Ravi1" <Ravi1.Kumar@amd.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] crypto/ccp: fix resource leak
Date: Mon, 12 Nov 2018 12:49:23 +0000	[thread overview]
Message-ID: <061a5484-e111-eb74-49f2-e145b6e67c40@nxp.com> (raw)
In-Reply-To: <SN1PR12MB2574633B58E5562CE89B70E9AEC90@SN1PR12MB2574.namprd12.prod.outlook.com>



On 11/4/2018 10:20 AM, Kumar, Ravi1 wrote:
>> File *fp, opened but not closed, this patch add fclose(fp)
>>
>> Fixes: ef4b04f87fa6 ("crypto/ccp: support device init")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> ---
>> drivers/crypto/ccp/ccp_pci.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/crypto/ccp/ccp_pci.c b/drivers/crypto/ccp/ccp_pci.c index 59152ca5d..1702a09c4 100644
>> --- a/drivers/crypto/ccp/ccp_pci.c
>> +++ b/drivers/crypto/ccp/ccp_pci.c
>> @@ -31,12 +31,15 @@ ccp_check_pci_uio_module(void)
>> 	while (uio_module_names[i] != NULL) {
>> 		while (fgets(buf, sizeof(buf), fp) != NULL) {
>> 			if (!strncmp(buf, uio_module_names[i],
>> -				     strlen(uio_module_names[i])))
>> +				     strlen(uio_module_names[i]))) {
>> +				fclose(fp);
>> 				return i;
>> +			}
>> 		}
>> 		i++;
>> 		rewind(fp);
>> 	}
>> +	fclose(fp);
>> 	printf("Insert igb_uio or uio_pci_generic kernel module(s)");
>> 	return -1;/* uio not inserted */
>> }
>> --
>> 2.17.2
>>
> Thanks Ferruh for the find. Looks good to me.
>
> Regards,
> Ravi
Added Reviewed-by from Ravi.
Applied to dpdk-next-crypto

Thanks

      reply	other threads:[~2018-11-12 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-28  3:19 Ferruh Yigit
2018-11-04  4:50 ` Kumar, Ravi1
2018-11-12 12:49   ` Akhil Goyal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=061a5484-e111-eb74-49f2-e145b6e67c40@nxp.com \
    --to=akhil.goyal@nxp.com \
    --cc=Ravi1.Kumar@amd.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).