[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEkB2EQ2BPpXcpRpN-+ErJD5Vkq6LiKONy8XQfvu0F1pO4weqw@mail.gmail.com>
Date: Tue, 5 Nov 2019 23:37:22 -0600
From: Navid Emamdoost <navid.emamdoost@...il.com>
To: Anna Schumaker <anna.schumaker@...app.com>,
Trond Myklebust <trond.myklebust@...merspace.com>
Cc: Navid Emamdoost <emamd001@....edu>,
Stephen McCamant <smccaman@....edu>, Kangjie Lu <kjlu@....edu>,
linux-nfs@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] NFSv4: fix memory leak if nfs4_begin_drain_session fails
Would you please review this patch?
On Thu, Sep 19, 2019 at 7:22 PM Navid Emamdoost
<navid.emamdoost@...il.com> wrote:
>
> In nfs4_try_migration, if nfs4_begin_drain_session fails the allocated
> memory should be released.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@...il.com>
> ---
> fs/nfs/nfs4state.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index cad4e064b328..124649f12067 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -2096,7 +2096,7 @@ static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred
>
> status = nfs4_begin_drain_session(clp);
> if (status != 0)
> - return status;
> + goto out;
>
> status = nfs4_replace_transport(server, locations);
> if (status != 0) {
> --
> 2.17.1
>
--
Navid.
Powered by blists - more mailing lists