Fix to Coverity issue 72738, passed NULL-pointer to a function which referenced it.
This commit is contained in:
@ -479,6 +479,11 @@ static bool resolve_maxscale_conf_fname(
|
|||||||
goto return_succp;
|
goto return_succp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/** Allocate memory for use of realpath */
|
||||||
|
*cnf_full_path = (char *)malloc(PATH_MAX+1);
|
||||||
|
}
|
||||||
/*<
|
/*<
|
||||||
* 3. argument is valid relative pathname
|
* 3. argument is valid relative pathname
|
||||||
* '-f ../myconf.cnf'
|
* '-f ../myconf.cnf'
|
||||||
@ -1705,10 +1710,6 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
thread_wait(threads[n]);
|
thread_wait(threads[n]);
|
||||||
}
|
}
|
||||||
free(threads);
|
|
||||||
free(home_dir);
|
|
||||||
free(cnf_file_path);
|
|
||||||
|
|
||||||
/*<
|
/*<
|
||||||
* Wait the flush thread.
|
* Wait the flush thread.
|
||||||
*/
|
*/
|
||||||
@ -1732,6 +1733,10 @@ int main(int argc, char **argv)
|
|||||||
unlink_pidfile();
|
unlink_pidfile();
|
||||||
|
|
||||||
return_main:
|
return_main:
|
||||||
|
free(threads);
|
||||||
|
free(home_dir);
|
||||||
|
free(cnf_file_path);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
} /*< End of main */
|
} /*< End of main */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user