Browse Source

Fix minor memory leak

PascalCoin 4 years ago
parent
commit
0ada9357b9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/URPC.pas

+ 2 - 2
src/core/URPC.pas

@@ -2567,8 +2567,8 @@ function TRPCProcess.ProcessMethod(const method: String; params: TPCJSONObject;
           Exit(False);
           Exit(False);
         end;
         end;
         // Override the JSON args (processed later by caller)
         // Override the JSON args (processed later by caller)
-        AJSONObj.SetAs('payload', TPCJSONVariantValue.CreateFromVariant(LEPasa.GetRawPayloadBytes.ToHexaString));
-        AJSONObj.SetAs('payload_type', TPCJSONVariantValue.CreateFromVariant(LEPasa.PayloadType.ToProtocolValue));
+        AJSONObj.GetAsVariant('payload').Value := LEPasa.GetRawPayloadBytes.ToHexaString;
+        AJSONObj.GetAsVariant('payload_type').Value := LEPasa.PayloadType.ToProtocolValue;
       end;
       end;
       AAccount := LEPasa.Account.Value;
       AAccount := LEPasa.Account.Value;
       Result := True;
       Result := True;