提交 7dd08a57 编写于 作者: D Dan Carpenter 提交者: Trond Myklebust

nfs: fix unlikely memory leak

I'll admit that it's unlikely for the first allocation to fail and
the second one to succeed.  I won't be offended if you ignore this
patch.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 5fe46e9d
......@@ -5107,6 +5107,7 @@ static int nfs41_proc_async_sequence(struct nfs_client *clp,
res = kzalloc(sizeof(*res), GFP_KERNEL);
if (!args || !res) {
kfree(args);
kfree(res);
nfs_put_client(clp);
return -ENOMEM;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册