Merge branch 'develop' of ssh://git.ecmwf.int:7999/eccodes/eccodes into develop

This commit is contained in:
Shahram Najm 2021-03-12 14:56:42 +00:00
commit 0882cc8e51
1 changed files with 2 additions and 2 deletions

View File

@ -185,12 +185,12 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len)
/*TODO implement the dirty mechanism to avoid to unpack every time */
err = grib_get_size(grib_handle_of_accessor(a), self->vector, &size);
DebugAssert(!err);
if (err) return err;
DebugAssert(size > 0);
vector = (long*)grib_context_malloc(a->context, sizeof(long) * size);
err = grib_unpack_long(va, vector, &size);
DebugAssert(!err);
grib_context_free(a->context, vector);
if (err) return err;
*val = v->v[self->index];