Fix previous overzealous leak fix

This commit is contained in:
Douglas Clowes
2014-03-07 10:28:22 +11:00
parent 012de6d735
commit 4225f79d88

View File

@ -397,26 +397,25 @@ static int TclSetPar(void *self, SConnection * pCon, char *name,
if (result == NULL) {
pDriv->errorCode = NOTCLRESULT;
free(tclCommand);
free(tclCommandPara);;
free(tclCommandPara);
return HWFault;
}
if (status != TCL_OK) {
pDriv->errorCode = TCLERROR;
strncpy(pDriv->tclError, result, 1023);
free(tclCommand);
free(tclCommandPara);;
free(tclCommandPara);
return HWFault;
} else {
snprintf(pBuffer, 511, "%s.%s = %s", pDriv->motName, name, result);
SCWrite(pCon, pBuffer, eValue);
}
free(tclCommand);
free(tclCommandPara);;
free(tclCommandPara);
return OKOK;
} else {
pDriv->errorCode = PARANOTFOUND;
free(tclCommand);
free(tclCommandPara);;
return 0;
}