Commit 32fba361 authored by Yousong Zhou's avatar Yousong Zhou Committed by Jo-Philipp Wich

exec: always call finish_cb to allow plugin to free up memory

Signed-off-by: default avatarYousong Zhou <yszhou4tech@gmail.com>
[fix whitespace, subject typo]
Signed-off-by: default avatarJo-Philipp Wich <jo@mein.io>
parent ca3e2d5e
......@@ -131,13 +131,13 @@ rpc_exec_reply(struct rpc_exec_context *c, int rv)
rpc_ustream_to_blobmsg(&c->blob, &c->opipe.stream, "stdout");
rpc_ustream_to_blobmsg(&c->blob, &c->epipe.stream, "stderr");
}
}
if (c->finish_cb)
rv = c->finish_cb(&c->blob, c->stat, c->priv);
if (c->finish_cb)
rv = c->finish_cb(&c->blob, c->stat, c->priv);
if (rv == UBUS_STATUS_OK)
ubus_send_reply(c->context, &c->request, c->blob.head);
}
if (rv == UBUS_STATUS_OK)
ubus_send_reply(c->context, &c->request, c->blob.head);
ubus_complete_deferred_request(c->context, &c->request, rv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment