libubus: add missing uloop_fd_delete call in ubus_shutdown
Leaving the fd added could cause segfaults if ctx is freed Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
9913aa61de
commit
f787c97b34
1 changed files with 1 additions and 0 deletions
|
@ -368,6 +368,7 @@ void ubus_shutdown(struct ubus_context *ctx)
|
||||||
blob_buf_free(&b);
|
blob_buf_free(&b);
|
||||||
if (!ctx)
|
if (!ctx)
|
||||||
return;
|
return;
|
||||||
|
uloop_fd_delete(&ctx->sock);
|
||||||
close(ctx->sock.fd);
|
close(ctx->sock.fd);
|
||||||
uloop_timeout_cancel(&ctx->pending_timer);
|
uloop_timeout_cancel(&ctx->pending_timer);
|
||||||
free(ctx->msgbuf.data);
|
free(ctx->msgbuf.data);
|
||||||
|
|
Loading…
Reference in a new issue