mirror of https://github.com/ecmwf/eccodes.git
Memory leak
This commit is contained in:
parent
a2d3d57789
commit
678c8eea86
|
@ -501,6 +501,7 @@ grib_context* grib_context_get_default()
|
||||||
char buffer[ECC_PATH_MAXLEN];
|
char buffer[ECC_PATH_MAXLEN];
|
||||||
ecc_snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", default_grib_context.grib_definition_files_path,
|
ecc_snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", default_grib_context.grib_definition_files_path,
|
||||||
ECC_PATH_DELIMITER_CHAR, ECCODES_DEFINITION_PATH);
|
ECC_PATH_DELIMITER_CHAR, ECCODES_DEFINITION_PATH);
|
||||||
|
free(default_grib_context.grib_definition_files_path);
|
||||||
default_grib_context.grib_definition_files_path = strdup(buffer);
|
default_grib_context.grib_definition_files_path = strdup(buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue