Skip to content

Commit

Permalink
Fix memory leak in sss protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Sep 4, 2016
1 parent afa5a72 commit b1b8034
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/XrdSecsss/XrdSecsssID.cc
Expand Up @@ -168,6 +168,7 @@ int XrdSecsssID::Register(const char *lid, XrdSecEntity *eP, int doRep)
{
sssID *idP;
int rc;
int hOpt = (doRep ? Hash_replace : Hash_default) | Hash_dofree;

// Check if we are simply deleting an entry
//
Expand All @@ -178,7 +179,7 @@ int XrdSecsssID::Register(const char *lid, XrdSecEntity *eP, int doRep)
//
if (!(idP = genID(eP))) return 0;
myMutex.Lock();
rc = (Registry.Add(lid, idP, (doRep ? Hash_replace : Hash_default)) ? 0:1);
rc = (Registry.Add(lid, idP, hOpt) ? 0 : 1);
myMutex.UnLock();
return rc;
}
Expand Down

0 comments on commit b1b8034

Please sign in to comment.