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")
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