Fix some memory leaks and use-after-free (cppcheck)

This commit is contained in:
Douglas Clowes
2014-03-03 17:18:52 +11:00
parent be347e813c
commit 9e65849964
6 changed files with 34 additions and 18 deletions

View File

@@ -415,9 +415,12 @@ static int TclSetPar(void *self, SConnection * pCon, char *name,
return OKOK;
} else {
pDriv->errorCode = PARANOTFOUND;
free(tclCommand);
free(tclCommandPara);;
return 0;
}
free(tclCommand);
return OKOK;
}
}