mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 10:50:41 +01:00
Prevent a segfault in dynafile creation
A failure during the dynafile creation (in prepareFile(), most of the time) led to a misaddressing and a segfault.
This commit is contained in:
parent
be940cf970
commit
008f0097b6
@ -768,7 +768,8 @@ prepareDynFile(instanceData *__restrict__ const pData, const uchar *__restrict__
|
||||
DBGPRINTF("Added new entry %d for file cache, file '%s'.\n", iFirstFree, newFileName);
|
||||
|
||||
finalize_it:
|
||||
pCache[pData->iCurrElt]->nInactive = 0;
|
||||
if(iRet == RS_RET_OK)
|
||||
pCache[pData->iCurrElt]->nInactive = 0;
|
||||
RETiRet;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user