CodeQL MemoryMayNotBeFreed.ql rtrCmd.c CmdRoute()
temporary channel created to run command is not cleaned up
This commit is contained in:
parent
822a95ab35
commit
cb9333804a
|
|
@ -575,8 +575,12 @@ CmdRoute(w, cmd)
|
||||||
if(cmd->tx_argc!=3)
|
if(cmd->tx_argc!=3)
|
||||||
goto wrongNumArgs;
|
goto wrongNumArgs;
|
||||||
if((ch = GCRRouteFromFile(cmd->tx_argv[2])) == (GCRChannel *) NULL)
|
if((ch = GCRRouteFromFile(cmd->tx_argv[2])) == (GCRChannel *) NULL)
|
||||||
TxError("Bad channel from file %s\n", cmd->tx_argv[2]);
|
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;
|
break;
|
||||||
case ROUTERSHOWRES:
|
case ROUTERSHOWRES:
|
||||||
GcrShowResult= !GcrShowResult;
|
GcrShowResult= !GcrShowResult;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue