Print

Print


@abh3 approved this pull request.

Minor nit, otherwise OK. I will merge but at some point you or I will address the nit that doesn't affect anything. Thanks for the fast turnaround.

> @@ -354,24 +355,24 @@ class XrdAccSciTokens : public XrdAccAuthorize, public XrdSciTokensHelper
         // We always populate the issuer and the groups, if present.
 
         // Access may be authorized; populate XrdSecEntity
-        auto mutable_entity = const_cast<XrdSecEntity*>(Entity);
-        free(mutable_entity->vorg); mutable_entity->vorg = nullptr;
-        free(mutable_entity->grps); mutable_entity->grps = nullptr;
-        free(mutable_entity->role); mutable_entity->role = nullptr;
+        XrdSecEntity new_secentity;
+        new_secentity.vorg = nullptr;
+        new_secentity.grps = nullptr;
+        new_secentity.role = nullptr;

No need to set these fields as the constructor does that for you.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/1382#pullrequestreview-568744256

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1