Fixed a critical bug where the elements names were not stored correctly

This commit is contained in:
celinemercier
2015-08-03 16:11:55 +02:00
parent ab44e32afb
commit 1fe2e36d5d
2 changed files with 3 additions and 7 deletions

View File

@ -450,12 +450,6 @@ static int create_version_file(OBIDMS_column_directory_p column_directory)
int obi_column_set_elements_names(OBIDMS_column_p column, const char* elements_names)
{
(column->header)->elements_names = malloc(strlen(elements_names)*sizeof(char) + 1);
if ((column->header)->elements_names == NULL)
{
obidebug(1, "\nError allocating the memory for elements names in an OBIDMS column");
return -1;
}
strcpy((column->header)->elements_names, elements_names);
return 0;
}