projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b089d46
)
io: fix another leak path for always array.
author
Rusty Russell
<rusty@rustcorp.com.au>
Sat, 16 Mar 2019 04:59:24 +0000
(15:29 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Sat, 16 Mar 2019 04:59:24 +0000
(15:29 +1030)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io/poll.c
patch
|
blob
|
history
diff --git
a/ccan/io/poll.c
b/ccan/io/poll.c
index a02152e3792ae07569d4a75b1ca423ecce5fb626..17f9384587d92e39b37e199b0f05159bb899d112 100644
(file)
--- a/
ccan/io/poll.c
+++ b/
ccan/io/poll.c
@@
-91,6
+91,10
@@
static void del_fd(struct fd *fd)
pollfds = tal_free(pollfds);
fds = NULL;
max_fds = 0;
+ if (num_always == 0) {
+ always = tal_free(always);
+ max_always = 0;
+ }
}
num_fds--;
fd->backend_info = -1;
@@
-140,7
+144,7
@@
static void remove_from_always(const struct io_plan *plan)
/* Only free if no fds left either. */
if (num_always == 0 && max_fds == 0) {
- tal_free(always);
+
always =
tal_free(always);
max_always = 0;
}
}