mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-20 05:00:42 +01:00
nitfix: theoretical NULL pointer access
but this code is currently not used, we even thing about removing array passing mode detected by clang static analyzer
This commit is contained in:
parent
cb93b5e7d8
commit
625c6fde63
21
action.c
21
action.c
@ -982,15 +982,20 @@ releaseDoActionParams(action_t *__restrict__ const pAction, wti_t *__restrict__
|
||||
switch(pAction->peParamPassing[j]) {
|
||||
case ACT_ARRAY_PASSING:
|
||||
ppMsgs = (uchar***) pWrkrInfo->p.nontx.actParams[0].param;
|
||||
if(((uchar**)ppMsgs)[j] != NULL) {
|
||||
jArr = 0;
|
||||
while(ppMsgs[j][jArr] != NULL) {
|
||||
free(ppMsgs[j][jArr]);
|
||||
ppMsgs[j][jArr] = NULL;
|
||||
++jArr;
|
||||
/* if we every use array passing mode again, we need to check
|
||||
* this code. It hasn't been used since refactoring for v7.
|
||||
*/
|
||||
if(ppMsgs != NULL) {
|
||||
if(((uchar**)ppMsgs)[j] != NULL) {
|
||||
jArr = 0;
|
||||
while(ppMsgs[j][jArr] != NULL) {
|
||||
free(ppMsgs[j][jArr]);
|
||||
ppMsgs[j][jArr] = NULL;
|
||||
++jArr;
|
||||
}
|
||||
free(((uchar**)ppMsgs)[j]);
|
||||
((uchar**)ppMsgs)[j] = NULL;
|
||||
}
|
||||
free(((uchar**)ppMsgs)[j]);
|
||||
((uchar**)ppMsgs)[j] = NULL;
|
||||
}
|
||||
break;
|
||||
case ACT_JSON_PASSING:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user