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:
Rainer Gerhards 2015-12-05 18:55:35 +01:00
parent cb93b5e7d8
commit 625c6fde63

View File

@ -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: