Bugfix memory issue in global options.
parent
a59e98d7a6
commit
306598db67
|
@ -128,6 +128,8 @@ void aiori_supported_apis(char * APIs, char * APIs_legacy, enum bench_type type)
|
|||
{
|
||||
ior_aiori_t **tmp = available_aiori;
|
||||
char delimiter = ' ';
|
||||
*APIs = 0;
|
||||
*APIs_legacy = 0;
|
||||
|
||||
while (*tmp != NULL)
|
||||
{
|
||||
|
@ -136,7 +138,6 @@ void aiori_supported_apis(char * APIs, char * APIs_legacy, enum bench_type type)
|
|||
tmp++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (delimiter == ' ')
|
||||
{
|
||||
APIs += sprintf(APIs, "%s", (*tmp)->name);
|
||||
|
@ -148,6 +149,7 @@ void aiori_supported_apis(char * APIs, char * APIs_legacy, enum bench_type type)
|
|||
if ((*tmp)->name_legacy != NULL)
|
||||
APIs_legacy += sprintf(APIs_legacy, "%c%s",
|
||||
delimiter, (*tmp)->name_legacy);
|
||||
|
||||
tmp++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -384,7 +384,7 @@ option_help * createGlobalOptions(IOR_param_t * params){
|
|||
char APIs[1024];
|
||||
char APIs_legacy[1024];
|
||||
aiori_supported_apis(APIs, APIs_legacy, IOR);
|
||||
char apiStr[1024];
|
||||
char * apiStr = safeMalloc(1024);
|
||||
sprintf(apiStr, "API for I/O [%s]", APIs);
|
||||
|
||||
option_help o [] = {
|
||||
|
|
Loading…
Reference in New Issue