ECC-1185: Crash in codes_context_delete() call (Part 2)

This commit is contained in:
Shahram Najm 2021-01-05 12:13:44 +00:00
parent b9b7451940
commit 5b5e5d4257
1 changed files with 7 additions and 0 deletions

View File

@ -766,6 +766,7 @@ void grib_context_free_persistent(const grib_context* c, void* p)
void grib_context_reset(grib_context* c)
{
size_t i = 0;
if (!c)
c = grib_context_get_default();
@ -813,6 +814,12 @@ void grib_context_reset(grib_context* c)
if (c->multi_support_on)
grib_multi_support_reset(c);
for (i=0; i < MAX_NUM_CONCEPTS; ++i) {
if (c->concepts[i]) {
grib_trie_delete_container(c->concepts[i]->index);
}
}
}
void grib_context_delete(grib_context* c)