Merge pull request #2076 from rgerhards/coverity

"fix" Coverity false positives
This commit is contained in:
Rainer Gerhards 2017-11-22 10:42:59 +01:00 committed by GitHub
commit 017a06e433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -808,8 +808,8 @@ ENDnewActInst
BEGINparseSelectorAct
CODESTARTparseSelectorAct
/* coverity [dead_code] - keep framework happy */
ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
iRet = RS_RET_CONFLINE_UNPROCESSED;
goto finalize_it; /* keep compiler happy (else we get "unused label" error) */
CODE_STD_FINALIZERparseSelectorAct
ENDparseSelectorAct

View File

@ -1278,6 +1278,7 @@ glblDoneLoadCnf(void)
} else if(!strcmp(paramblk.descr[i].name, "errormessagestostderr.maxnumber")) {
loadConf->globals.maxErrMsgToStderr = (int) cnfparamvals[i].val.d.n;
} else if(!strcmp(paramblk.descr[i].name, "debug.files")) {
free(glblDbgFiles); /* "fix" Coverity false positive */
glblDbgFilesNum = cnfparamvals[i].val.d.ar->nmemb;
glblDbgFiles = (char**) malloc(cnfparamvals[i].val.d.ar->nmemb * sizeof(char*));
for(int j = 0 ; j < cnfparamvals[i].val.d.ar->nmemb ; ++j) {