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>
This commit is contained in:
parent
ca3e2d5e70
commit
32fba361d5
1 changed files with 6 additions and 6 deletions
2
exec.c
2
exec.c
|
@ -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->opipe.stream, "stdout");
|
||||||
rpc_ustream_to_blobmsg(&c->blob, &c->epipe.stream, "stderr");
|
rpc_ustream_to_blobmsg(&c->blob, &c->epipe.stream, "stderr");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (c->finish_cb)
|
if (c->finish_cb)
|
||||||
rv = c->finish_cb(&c->blob, c->stat, c->priv);
|
rv = c->finish_cb(&c->blob, c->stat, c->priv);
|
||||||
|
|
||||||
if (rv == UBUS_STATUS_OK)
|
if (rv == UBUS_STATUS_OK)
|
||||||
ubus_send_reply(c->context, &c->request, c->blob.head);
|
ubus_send_reply(c->context, &c->request, c->blob.head);
|
||||||
}
|
|
||||||
|
|
||||||
ubus_complete_deferred_request(c->context, &c->request, rv);
|
ubus_complete_deferred_request(c->context, &c->request, rv);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue