Skip to content

Commit

Permalink
Fix leak in configOptionRemote().
Browse files Browse the repository at this point in the history
A Pack and String were leaked.
  • Loading branch information
dwsteele committed Apr 26, 2022
1 parent 9a6df39 commit 78b90e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/config/protocol.c
Expand Up @@ -63,9 +63,11 @@ configOptionRemote(ProtocolClient *client, const VariantList *paramList)
for (unsigned int paramIdx = 0; paramIdx < varLstSize(paramList); paramIdx++)
pckWriteStrP(param, varStr(varLstGet(paramList, paramIdx)));

const String *const json = pckReadStrP(protocolClientExecute(client, command, true));

MEM_CONTEXT_PRIOR_BEGIN()
{
result = varVarLst(jsonToVar(pckReadStrP(protocolClientExecute(client, command, true))));
result = varVarLst(jsonToVar(json));
}
MEM_CONTEXT_PRIOR_END();
}
Expand Down

0 comments on commit 78b90e5

Please sign in to comment.