Fix previous overzealous leak fix
This commit is contained in:
@ -397,26 +397,25 @@ static int TclSetPar(void *self, SConnection * pCon, char *name,
|
|||||||
if (result == NULL) {
|
if (result == NULL) {
|
||||||
pDriv->errorCode = NOTCLRESULT;
|
pDriv->errorCode = NOTCLRESULT;
|
||||||
free(tclCommand);
|
free(tclCommand);
|
||||||
free(tclCommandPara);;
|
free(tclCommandPara);
|
||||||
return HWFault;
|
return HWFault;
|
||||||
}
|
}
|
||||||
if (status != TCL_OK) {
|
if (status != TCL_OK) {
|
||||||
pDriv->errorCode = TCLERROR;
|
pDriv->errorCode = TCLERROR;
|
||||||
strncpy(pDriv->tclError, result, 1023);
|
strncpy(pDriv->tclError, result, 1023);
|
||||||
free(tclCommand);
|
free(tclCommand);
|
||||||
free(tclCommandPara);;
|
free(tclCommandPara);
|
||||||
return HWFault;
|
return HWFault;
|
||||||
} else {
|
} else {
|
||||||
snprintf(pBuffer, 511, "%s.%s = %s", pDriv->motName, name, result);
|
snprintf(pBuffer, 511, "%s.%s = %s", pDriv->motName, name, result);
|
||||||
SCWrite(pCon, pBuffer, eValue);
|
SCWrite(pCon, pBuffer, eValue);
|
||||||
}
|
}
|
||||||
free(tclCommand);
|
free(tclCommand);
|
||||||
free(tclCommandPara);;
|
free(tclCommandPara);
|
||||||
return OKOK;
|
return OKOK;
|
||||||
} else {
|
} else {
|
||||||
pDriv->errorCode = PARANOTFOUND;
|
pDriv->errorCode = PARANOTFOUND;
|
||||||
free(tclCommand);
|
free(tclCommand);
|
||||||
free(tclCommandPara);;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user