mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 04:30:43 +01:00
kafka: fixed multiple coverity scan issues
CID 185720, 185719 fixed by correcting expression check for MsgFile handle. CID 185723 fixed by removing CHKiRET CID 185722 added additional check (stat) for MsgFile before unlink Fixed 2 clang issues in imkafka as well
This commit is contained in:
parent
f9f99d90ef
commit
37636969aa
@ -534,8 +534,8 @@ CODESTARTnewInpInst
|
||||
es_deleteStr(es);
|
||||
} else if(!strcmp(inppblk.descr[i].name, "confparam")) {
|
||||
inst->nConfParams = pvals[i].val.d.ar->nmemb;
|
||||
CHKmalloc(inst->confParams = malloc(sizeof(struct kafka_params)*pvals[i].val.d.ar->nmemb));
|
||||
for(int j = 0; j < pvals[i].val.d.ar->nmemb; j++) {
|
||||
CHKmalloc(inst->confParams = malloc(sizeof(struct kafka_params)*inst->nConfParams));
|
||||
for(int j = 0; j < inst->nConfParams; j++) {
|
||||
char *cstr = es_str2cstr(pvals[i].val.d.ar->arr[j], NULL);
|
||||
CHKiRet(processKafkaParam(cstr, &inst->confParams[j].name,
|
||||
&inst->confParams[j].val));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user