[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221004215114.1850991-2-asmadeus@codewreck.org>
Date: Wed, 5 Oct 2022 06:51:14 +0900
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Christian Schoenebeck <linux_oss@...debyte.com>
Cc: v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
Dan Carpenter <dan.carpenter@...cle.com>,
Leon Romanovsky <leon@...nel.org>,
Dominique Martinet <asmadeus@...ewreck.org>
Subject: [PATCH 2/2] 9p: avoid double put_trans on parse_opt failure
p9_client_destroy will catch that trans and put it when p9_client_create fails
This was brought up when reviewing an alternative implementation of the
previous patch [1]
Link: https://lkml.kernel.org/r/YzVzjR4Yz3Oo3JS+@codewreck.org [1]
Fixes: 3ff51294a055 ("9p: p9_client_create: use p9_client_destroy on failure")
Signed-off-by: Dominique Martinet <asmadeus@...ewreck.org>
---
net/9p/client.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index cf2d5b60b61b..693e06213a04 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -212,8 +212,6 @@ static int parse_opts(char *opts, struct p9_client *clnt)
}
free_and_return:
- if (ret)
- v9fs_put_trans(clnt->trans_mod);
kfree(tmp_options);
return ret;
}
--
2.35.1
Powered by blists - more mailing lists