Fixes to Coverity errors:
72747 75940 75941 73408 75425
This commit is contained in:
@ -302,7 +302,7 @@ routeQuery(FILTER *instance, void *session, GWBUF *queue)
|
||||
REGEX_INSTANCE *my_instance = (REGEX_INSTANCE *)instance;
|
||||
REGEX_SESSION *my_session = (REGEX_SESSION *)session;
|
||||
char *sql, *newsql;
|
||||
int length;
|
||||
int length = 0;
|
||||
|
||||
if (modutil_is_SQL(queue))
|
||||
{
|
||||
|
||||
@ -415,6 +415,7 @@ GWBUF *clone = NULL;
|
||||
modutil_MySQL_Query(queue, &dummy, &length, &residual);
|
||||
clone = gwbuf_clone(queue);
|
||||
my_session->residual = residual;
|
||||
free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -303,7 +303,7 @@ int load_query()
|
||||
int i, qcount = 0, qbuff_sz = 10, rval = 0;
|
||||
int offset = 0;
|
||||
unsigned int qlen = 0;
|
||||
buffer = (char*)malloc(4092*sizeof(char));
|
||||
buffer = (char*)calloc(4092,sizeof(char));
|
||||
if(buffer == NULL){
|
||||
printf("Error: cannot allocate enough memory.\n");
|
||||
skygw_log_write(LOGFILE_ERROR,"Error: cannot allocate enough memory.\n");
|
||||
|
||||
Reference in New Issue
Block a user