mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 21:30:42 +01:00
core/template: fix double free due to 9e3efd4960eb6133c99b0842e5a717ba37b5cda1
Fix 9e3efd4960eb6133c99b0842e5a717ba37b5cda1 was incomplete, causing a double-free. Detected by Coverity scan, CID 185476
This commit is contained in:
parent
f2cdef10c5
commit
72496ac8b4
@ -178,8 +178,6 @@ tplToString(struct template *__restrict__ const pTpl,
|
||||
if(iLenVal >= (rs_size_t)iparam->lenBuf) /* we reserve one char for the final \0! */
|
||||
CHKiRet(ExtendBuf(iparam, iLenVal + 1));
|
||||
memcpy(iparam->param, pVal, iLenVal+1);
|
||||
if(bMustBeFreed)
|
||||
free(pVal);
|
||||
FINALIZE;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user