Fixes to Coverity tasks 72734, 72717, 72700
This commit is contained in:
parent
9ccbab1899
commit
10f8d0535a
@ -549,6 +549,7 @@ static bool resolve_maxscale_homedir(
|
||||
if (*p_home_dir != NULL)
|
||||
{
|
||||
log_context = strdup("Command-line argument");
|
||||
tmp = NULL;
|
||||
goto check_home_dir;
|
||||
}
|
||||
/*<
|
||||
@ -640,7 +641,7 @@ check_home_dir:
|
||||
fprintf(stderr,
|
||||
"Using %s as MAXSCALE_HOME = %s\n",
|
||||
log_context,
|
||||
tmp);
|
||||
(tmp == NULL ? *p_home_dir : tmp));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -648,8 +649,11 @@ check_home_dir:
|
||||
{
|
||||
succp = false;
|
||||
}
|
||||
free(tmp);
|
||||
|
||||
if (tmp != NULL)
|
||||
{
|
||||
free(tmp);
|
||||
}
|
||||
|
||||
if (log_context != NULL)
|
||||
{
|
||||
free(log_context);
|
||||
|
@ -192,6 +192,7 @@ int i, cflags = REG_ICASE;
|
||||
|
||||
if (my_instance->match == NULL || my_instance->replace == NULL)
|
||||
{
|
||||
free(my_instance);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -386,6 +387,8 @@ regmatch_t match[10];
|
||||
free(orig);
|
||||
return NULL;
|
||||
}
|
||||
free(orig);
|
||||
|
||||
res_size = 2 * length;
|
||||
result = (char *)malloc(res_size);
|
||||
res_length = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user