diff --git a/src/grib_context.c b/src/grib_context.c index 217ccde8a..90d8f2b29 100644 --- a/src/grib_context.c +++ b/src/grib_context.c @@ -501,6 +501,7 @@ grib_context* grib_context_get_default() char buffer[ECC_PATH_MAXLEN]; ecc_snprintf(buffer, ECC_PATH_MAXLEN, "%s%c%s", default_grib_context.grib_definition_files_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); } }