From 2479a8670c6cdcf4f7570c98677b68c2e0dc1068 Mon Sep 17 00:00:00 2001 From: Eugen Betke Date: Mon, 21 Oct 2024 18:30:44 +0200 Subject: [PATCH] Modernisatino: Fix error handling --- .../grib_iterator_class_lambert_azimuthal_equal_area.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/geo_iterator/grib_iterator_class_lambert_azimuthal_equal_area.cc b/src/geo_iterator/grib_iterator_class_lambert_azimuthal_equal_area.cc index 15eff4bef..a3f2f32f8 100644 --- a/src/geo_iterator/grib_iterator_class_lambert_azimuthal_equal_area.cc +++ b/src/geo_iterator/grib_iterator_class_lambert_azimuthal_equal_area.cc @@ -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; }