diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2019-10-21 06:10:28 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-10-29 09:24:46 +0100 |
commit | 32fba361d51f01c3f26d4ab1a770773427ad3c48 (patch) | |
tree | 61ae3965d760df804333f64adf2bae478b479181 | |
parent | ca3e2d5e70f188cc73a9bd1dadd3dcf2603bdba7 (diff) | |
download | rpcd-32fba361d51f01c3f26d4ab1a770773427ad3c48.tar.gz |
exec: always call finish_cb to allow plugin to free up memory
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
[fix whitespace, subject typo]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | exec.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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); |