Skip to content

Commit

Permalink
Fix memory leaks and update some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed May 25, 2014
1 parent 47c13fa commit c71dd68
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/XrdSsi/XrdSsiFileReq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ void XrdSsiFileReq::Recycle()
// Add to queue unless we have too many of these
//
aqMutex.Lock();
if (tident) {free(tident); tident = 0;}
if (freeCnt >= freeMax) {aqMutex.UnLock(); delete this;}
else {nextReq = freeReq;
freeReq = this;
Expand Down
6 changes: 3 additions & 3 deletions src/XrdSsi/XrdSsiResponder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
//! implementation class and its agent classes (i.e. classes that do work on
//! its behalf) inherit this class.
//!
//! When the XrdSsiResponder.hh::SetResponse() method is called to post a response
//! the request object's ProcessResponse() method is called. Owbership of the
//! When the XrdSsiResponder::SetResponse() method is called to post a response
//! the request object's ProcessResponse() method is called. Ownership of the
//! request object does not revert back to the object's creator until the
//! XrdSsiRequest::Finished() menthod returns. This allows the session to
//! XrdSsiRequest::Finished() method returns. This allows the session to
//! reclaim any response data buffer or stream resource before it gives up
//! control of the request object.
//!
Expand Down
4 changes: 4 additions & 0 deletions src/XrdSsi/XrdSsiSessReal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ namespace

XrdSsiSessReal::~XrdSsiSessReal()
{
XrdSsiTaskReal *tP;

if (sessName) free(sessName);
if (sessNode) free(sessNode);

while((tP = freeTask)) {freeTask = tP->attList.next; delete tP;}
}

/******************************************************************************/
Expand Down

0 comments on commit c71dd68

Please sign in to comment.