summaryrefslogtreecommitdiff
path: root/net/sunrpc/sched.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2022-04-15 10:26:00 +0300
committerPaolo Abeni <pabeni@redhat.com>2022-04-15 10:26:00 +0300
commitedf45f007a31e86738f6be3065591ddad94477d1 (patch)
tree2805eeead7a03344a2b1185314d791a65fe15dc1 /net/sunrpc/sched.c
parentcaf968b483351d8825e68b06d77de5eb618aeb64 (diff)
parentd20339fa93e9810fcf87518bdd62e44f62bb64ee (diff)
downloadlinux-edf45f007a31e86738f6be3065591ddad94477d1.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r--net/sunrpc/sched.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index b258b87a3ec2..7f70c1e608b7 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -1128,6 +1128,11 @@ struct rpc_task *rpc_new_task(const struct rpc_task_setup *setup_data)
if (task == NULL) {
task = rpc_alloc_task();
+ if (task == NULL) {
+ rpc_release_calldata(setup_data->callback_ops,
+ setup_data->callback_data);
+ return ERR_PTR(-ENOMEM);
+ }
flags = RPC_TASK_DYNAMIC;
}