* [PATCH] [nfs/nfs-utils/libtirpc] bindresvport.c: fix a potential resource leakage
@ 2022-10-20 6:33 Zhi Li
2022-10-24 17:48 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Zhi Li @ 2022-10-20 6:33 UTC (permalink / raw)
To: linux-nfs; +Cc: steved, Zhi Li
Close the FILE *fp of load_blacklist() in another
return path to avoid potential resource leakage.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2135405
Signed-off-by: Zhi Li <yieli@redhat.com>
---
src/bindresvport.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/bindresvport.c b/src/bindresvport.c
index 5c0ddcf..efeb1cc 100644
--- a/src/bindresvport.c
+++ b/src/bindresvport.c
@@ -130,6 +130,7 @@ load_blacklist (void)
if (list == NULL)
{
free (buf);
+ fclose (fp);
return;
}
}
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [nfs/nfs-utils/libtirpc] bindresvport.c: fix a potential resource leakage
2022-10-20 6:33 [PATCH] [nfs/nfs-utils/libtirpc] bindresvport.c: fix a potential resource leakage Zhi Li
@ 2022-10-24 17:48 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2022-10-24 17:48 UTC (permalink / raw)
To: Zhi Li, linux-nfs
On 10/20/22 2:33 AM, Zhi Li wrote:
> Subject:
> [PATCH] [nfs/nfs-utils/libtirpc] bindresvport.c: fix a potential
> resource leakage
> From:
> Zhi Li <yieli@redhat.com>
> Date:
> 10/20/22, 2:33 AM
>
> To:
> linux-nfs@vger.kernel.org
> CC:
> steved@redhat.com, Zhi Li <yieli@redhat.com>
>
>
> Close the FILE *fp of load_blacklist() in another
> return path to avoid potential resource leakage.
>
> Fixes:https://bugzilla.redhat.com/show_bug.cgi?id=2135405
> Signed-off-by: Zhi Li<yieli@redhat.com>
Committed...
steved.
> ---
> src/bindresvport.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/bindresvport.c b/src/bindresvport.c
> index 5c0ddcf..efeb1cc 100644
> --- a/src/bindresvport.c
> +++ b/src/bindresvport.c
> @@ -130,6 +130,7 @@ load_blacklist (void)
> if (list == NULL)
> {
> free (buf);
> + fclose (fp);
> return;
> }
> }
> -- 2.31.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-24 19:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-20 6:33 [PATCH] [nfs/nfs-utils/libtirpc] bindresvport.c: fix a potential resource leakage Zhi Li
2022-10-24 17:48 ` Steve Dickson
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).