Modernisatino: Fix error handling

This commit is contained in:
Eugen Betke 2024-10-21 18:30:44 +02:00
parent c42c772f5e
commit 2479a8670c
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ int LambertAzimuthalEqualArea::init_oblate(grib_handle* h,
return GRIB_OUT_OF_MEMORY;
}
lons_ = (double*)grib_context_malloc(h->context, nv * sizeof(double));
if (!lats_) {
if (!lons_) {
grib_context_log(h->context, GRIB_LOG_ERROR, "%s: Error allocating %zu bytes", ITER, nv * sizeof(double));
return GRIB_OUT_OF_MEMORY;
}