diff options
| author | Felix Fietkau | 2023-06-05 20:05:55 +0000 |
|---|---|---|
| committer | Felix Fietkau | 2023-06-05 20:05:56 +0000 |
| commit | f787c97b34894a38b15599886cacbca01271684f (patch) | |
| tree | 5641a8e915f5228b13f3a1e85e45145212dc24b4 | |
| parent | 9913aa61de739e3efe067a2d186021c20bcd65e2 (diff) | |
| download | ubus-f787c97b34894a38b15599886cacbca01271684f.tar.gz | |
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>
| -rw-r--r-- | libubus.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -368,6 +368,7 @@ void ubus_shutdown(struct ubus_context *ctx) blob_buf_free(&b); if (!ctx) return; + uloop_fd_delete(&ctx->sock); close(ctx->sock.fd); uloop_timeout_cancel(&ctx->pending_timer); free(ctx->msgbuf.data); |