Fixes to Coverity errors:
72662 72702 72724 73397 73410 73414 73422 75424 75748 75789 75938 75939 Also includes a fix to a bug caused by a previous Coverity error change in canonizer.c
This commit is contained in:
@ -137,8 +137,8 @@ FILTER_PARAMETER** read_params(int* paramc)
|
||||
do_read = 0;
|
||||
}
|
||||
}
|
||||
FILTER_PARAMETER** params;
|
||||
if((params = malloc(sizeof(FILTER_PARAMETER*)*(pc+1)))!=NULL){
|
||||
FILTER_PARAMETER** params = NULL;
|
||||
if((params = malloc(sizeof(FILTER_PARAMETER*)*(pc+1))) != NULL){
|
||||
for(i = 0;i<pc;i++){
|
||||
params[i] = malloc(sizeof(FILTER_PARAMETER));
|
||||
if(params[i]){
|
||||
@ -147,10 +147,10 @@ FILTER_PARAMETER** read_params(int* paramc)
|
||||
}
|
||||
free(names[i]);
|
||||
free(values[i]);
|
||||
}
|
||||
}
|
||||
params[pc] = NULL;
|
||||
*paramc = pc;
|
||||
}
|
||||
params[pc] = NULL;
|
||||
*paramc = pc;
|
||||
return params;
|
||||
}
|
||||
|
||||
@ -925,8 +925,9 @@ GWBUF* gen_packet(PACKET pkt)
|
||||
|
||||
int process_opts(int argc, char** argv)
|
||||
{
|
||||
int fd = open_file("harness.cnf",1), buffsize = 1024;
|
||||
int rd,fsize,rdsz;
|
||||
unsigned int fd = open_file("harness.cnf",1), buffsize = 1024;
|
||||
int rd,rdsz;
|
||||
unsigned int fsize;
|
||||
char *buff = calloc(buffsize,sizeof(char)), *tok = NULL;
|
||||
|
||||
/**Parse 'harness.cnf' file*/
|
||||
|
||||
Reference in New Issue
Block a user