projects
/
project
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9913aa6
)
libubus: add missing uloop_fd_delete call in ubus_shutdown
author
Felix Fietkau
<nbd@nbd.name>
Mon, 5 Jun 2023 20:05:55 +0000
(22:05 +0200)
committer
Felix Fietkau
<nbd@nbd.name>
Mon, 5 Jun 2023 20:05:56 +0000
(22:05 +0200)
Leaving the fd added could cause segfaults if ctx is freed
Signed-off-by: Felix Fietkau <nbd@nbd.name>
libubus.c
patch
|
blob
|
history
diff --git
a/libubus.c
b/libubus.c
index fc0d933894dd7ee9fb11a32414eba95952597f96..d625940d8edbf35419ad0c65ea53f2bade3424c6 100644
(file)
--- a/
libubus.c
+++ b/
libubus.c
@@
-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);