Skip to content

Commit

Permalink
[XrdCl] Make sure XCpSrc does not leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal authored and gganis committed Nov 23, 2021
1 parent b9b75e3 commit 21df9c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/XrdCl/XrdClXCpSrc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class ChunkHandler: public ResponseHandler
if( response ) // get the response
{
ToChunk( response, chunk );
response->Set( ( int* )0 );
delete response;
}

Expand Down Expand Up @@ -83,7 +82,7 @@ class ChunkHandler: public ResponseHandler

private:

void ToChunk( AnyObject *response, ChunkInfo *&chunk )
void ToChunk( AnyObject *response, ChunkInfo *&chunk ) // TODO PageInfo is not deleted !!!
{
if( pUsePgRead )
{
Expand All @@ -92,7 +91,10 @@ class ChunkHandler: public ResponseHandler
chunk = new ChunkInfo( rsp->GetOffset(), rsp->GetLength(), rsp->GetBuffer() );
}
else
{
response->Get( chunk );
response->Set( ( int* )0 );
}
}

XCpSrc *pSrc;
Expand Down

0 comments on commit 21df9c3

Please sign in to comment.