Skip to content

Commit

Permalink
[XrdCl] Make sure lambda wrapper does not use status obj after it's d…
Browse files Browse the repository at this point in the history
…eleated.
  • Loading branch information
simonmichal authored and gganis committed Nov 23, 2021
1 parent 1a364ee commit 2ea4d6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/XrdCl/XrdClXRootDResponses.cc
Original file line number Diff line number Diff line change
Expand Up @@ -784,10 +784,10 @@ namespace XrdCl

void HandleResponse( XRootDStatus *status, AnyObject *response )
{
// call the user completion handler
func( status, response );
// check if this is a final respons
bool finalrsp = !( status->IsOK() && status->code == suContinue );
// call the user completion handler
func( status, response );
// deallocate the wrapper if final
if( finalrsp )
delete this;
Expand Down

0 comments on commit 2ea4d6f

Please sign in to comment.