mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 22:00:42 +01:00
imrelp: fix regression from very recent commit
Commit 32b71daa8aadb8f16fe0ca2945e54d593f47a824 introduced a potential misadressing of "inst" during error processing. No version with that commit was ever released. Detected by Coverity Scan, CID 190327
This commit is contained in:
parent
1bcfe083df
commit
a78220a933
@ -479,7 +479,7 @@ finalize_it:
|
|||||||
|
|
||||||
BEGINnewInpInst
|
BEGINnewInpInst
|
||||||
struct cnfparamvals *pvals;
|
struct cnfparamvals *pvals;
|
||||||
instanceConf_t *inst;
|
instanceConf_t *inst = NULL;
|
||||||
int i,j;
|
int i,j;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
CODESTARTnewInpInst
|
CODESTARTnewInpInst
|
||||||
@ -609,10 +609,12 @@ finalize_it:
|
|||||||
CODE_STD_FINALIZERnewInpInst
|
CODE_STD_FINALIZERnewInpInst
|
||||||
cnfparamvalsDestruct(pvals, &inppblk);
|
cnfparamvalsDestruct(pvals, &inppblk);
|
||||||
if(iRet != RS_RET_OK) {
|
if(iRet != RS_RET_OK) {
|
||||||
free(inst->myCertFile);
|
if(inst != NULL) {
|
||||||
inst->myCertFile = NULL;
|
free(inst->myCertFile);
|
||||||
free(inst->myPrivKeyFile);
|
inst->myCertFile = NULL;
|
||||||
inst->myPrivKeyFile = NULL;
|
free(inst->myPrivKeyFile);
|
||||||
|
inst->myPrivKeyFile = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ENDnewInpInst
|
ENDnewInpInst
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user