diff options
author | Eric Wong <e@80x24.org> | 2021-02-07 08:52:01 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-07 22:57:30 +0000 |
commit | 072d326a8acb2633fbbadf87005b7e546e3da832 (patch) | |
tree | 61029dad891eb1b493508bf0082786411b32d168 /lib | |
parent | 18798ea686b3c5cc46831e6b3bd1dec0cefa3137 (diff) | |
download | public-inbox-072d326a8acb2633fbbadf87005b7e546e3da832.tar.gz |
While this doesn't fix a known problem, this was a risky construct in case somebody uses confess/longmess inside the user-supplied callback. cf. commit 0795b0906cc81f40 ("ds: guard against stack-not-refcounted quirk of Perl 5")
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/HTTPD/Async.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm index 1de9501d..7238650a 100644 --- a/lib/PublicInbox/HTTPD/Async.pm +++ b/lib/PublicInbox/HTTPD/Async.pm @@ -46,7 +46,7 @@ sub event_step { my ($self) = @_; if (my $cb = delete $self->{cb}) { # this may call async_pass when headers are done - $cb->(delete $self->{arg}); + $cb->(my $refcnt_guard = delete $self->{arg}); } elsif (my $sock = $self->{sock}) { my $http = $self->{http}; # $self->{sock} is a read pipe for git-http-backend or cgit |