diff options
author | Eric Wong <e@80x24.org> | 2022-08-09 00:19:11 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2022-08-09 16:37:48 +0000 |
commit | 4a90540056afce4f73da97300e6709993355fe4f (patch) | |
tree | cf8f1814ee0bc456b913c89e79b35903458358d3 /ext/mwrap/mwrap.c | |
parent | 5120b83117179f81c7c73c41c122da0f6f5cbdb7 (diff) | |
download | mwrap-4a90540056afce4f73da97300e6709993355fe4f.tar.gz |
We must not forget to release RCU read locks even if the process will probably die, soon, due to ENOMEM. I noticed this while working on the Perl5/XS port. Link: https://80x24.org/mwrap-perl/20191102020331.28050-4-e@80x24.org/
Diffstat (limited to 'ext/mwrap/mwrap.c')
-rw-r--r-- | ext/mwrap/mwrap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c index 2ee04a5..4575e34 100644 --- a/ext/mwrap/mwrap.c +++ b/ext/mwrap/mwrap.c @@ -632,9 +632,9 @@ internal_memalign(void **pp, size_t alignment, size_t size, uintptr_t caller) p = ptr_align(p, alignment); h = ptr2hdr(p); alloc_insert_rcu(l, h, size, real); - update_stats_rcu_unlock(l); *pp = p; } + update_stats_rcu_unlock(l); } return real ? 0 : ENOMEM; |