CodeQL MemoryMayNotBeFreed.ql rtrCmd.c CmdRoute()

temporary channel created to run command is not cleaned up
This commit is contained in:
Darryl L. Miles 2025-02-13 08:32:00 +00:00 committed by Tim Edwards
parent 822a95ab35
commit cb9333804a
1 changed files with 6 additions and 2 deletions

View File

@ -576,7 +576,11 @@ CmdRoute(w, cmd)
goto wrongNumArgs;
if((ch = GCRRouteFromFile(cmd->tx_argv[2])) == (GCRChannel *) NULL)
TxError("Bad channel from file %s\n", cmd->tx_argv[2]);
else RtrPaintBack(ch, EditCellUse->cu_def);
else
{
RtrPaintBack(ch, EditCellUse->cu_def);
GCRFreeChannel(ch);
}
break;
case ROUTERSHOWRES:
GcrShowResult= !GcrShowResult;