Fix memory issue
This commit is contained in:
@@ -578,7 +578,7 @@ int set_parameter(
|
||||
// matches any argument that starts with 'file:'
|
||||
else if (strncmp(rhs,"file:",5)==0){
|
||||
parameters->init=INIT_FILE;
|
||||
*initfile_str=calloc(sizeof(char), strlen(rhs)-5);
|
||||
*initfile_str=calloc(sizeof(char), strlen(rhs)-5+1);
|
||||
strcpy(*initfile_str, rhs+5);
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user