- Introducted Arg2Tcl as a replacement for some calls to Arg2Text
- Fixed a memory leak
This commit is contained in:
@ -1214,12 +1214,11 @@ static void ErrReport(pEVControl self)
|
||||
strtolower(argv[1]);
|
||||
if(strcmp(argv[1],"errorscript") == 0)
|
||||
{
|
||||
Arg2Text(argc-2,&argv[2],pBueffel,255);
|
||||
if(self->errorScript != NULL)
|
||||
{
|
||||
free(self->errorScript);
|
||||
}
|
||||
self->errorScript = strdup(pBueffel);
|
||||
self->errorScript = Arg2Tcl(argc-2,&argv[2],NULL,0);
|
||||
SCSendOK(pCon);
|
||||
SCparChange(pCon);
|
||||
return 1;
|
||||
@ -1542,8 +1541,7 @@ int RemoveEVController(SConnection *pCon, char *name) {
|
||||
return 0;
|
||||
}
|
||||
if (pNew->pDriv->SavePars) {
|
||||
Arg2Text(argc-3, argv+3, pBueffel, sizeof pBueffel);
|
||||
pNew->creationArgs = strdup(pBueffel);
|
||||
pNew->creationArgs = Arg2Tcl(argc-3, argv+3, NULL, 0);
|
||||
pNew->pDes->SaveStatus = EVSaveStatus;
|
||||
} else {
|
||||
pNew->creationArgs = NULL;
|
||||
|
Reference in New Issue
Block a user