Resolve additional cppcheck issues; fix iOS build
This commit is contained in:
@@ -243,6 +243,7 @@ int tpn(const char *pname, const char *pvalue)
|
||||
ptpnInfo = calloc(1, sizeof(tpnInfo));
|
||||
if (!ptpnInfo) {
|
||||
printf("calloc failed\n");
|
||||
free(ppn);
|
||||
dbChannelDelete(chan);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "epicsEvent.h"
|
||||
#include "epicsMutex.h"
|
||||
#include "epicsStdio.h"
|
||||
#include "epicsString.h"
|
||||
#include "epicsThread.h"
|
||||
#include "epicsTime.h"
|
||||
#include "errlog.h"
|
||||
|
||||
@@ -559,6 +559,7 @@ iocshBody (const char *pathname, const char *commandLine, const char *macros)
|
||||
|
||||
if (macros) {
|
||||
if (macParseDefns(NULL, macros, &defines) < 0) {
|
||||
free(redirects);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -571,6 +572,7 @@ iocshBody (const char *pathname, const char *commandLine, const char *macros)
|
||||
if (handle == NULL) {
|
||||
if (macCreateHandle(&handle, pairs)) {
|
||||
errlogMessage("iocsh: macCreateHandle failed.");
|
||||
free(redirects);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -250,5 +250,12 @@ MAIN(epicsEventTest)
|
||||
eventWaitTest();
|
||||
eventWakeupTest();
|
||||
|
||||
free(name);
|
||||
free(id);
|
||||
epicsRingPointerDelete(pinfo->ring);
|
||||
epicsMutexDestroy(pinfo->lockRing);
|
||||
epicsEventDestroy(event);
|
||||
free(pinfo);
|
||||
|
||||
return testDone();
|
||||
}
|
||||
|
||||
@@ -279,5 +279,11 @@ MAIN(epicsMutexTest)
|
||||
|
||||
epicsMutexPerformance ();
|
||||
|
||||
free(pinfo);
|
||||
free(arg);
|
||||
free(name);
|
||||
free(id);
|
||||
epicsMutexDestroy(mutex);
|
||||
|
||||
return testDone();
|
||||
}
|
||||
|
||||
@@ -115,5 +115,9 @@ MAIN(ringBytesTest)
|
||||
testOk(n==1, "ring get %d", 1);
|
||||
check(ring, RINGSIZE);
|
||||
|
||||
epicsRingBytesDelete(ring);
|
||||
epicsEventDestroy(consumerEvent);
|
||||
free(pinfo);
|
||||
|
||||
return testDone();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user