mirror of https://github.com/ecmwf/eccodes.git
Modernisatino: Fix error handling
This commit is contained in:
parent
c42c772f5e
commit
2479a8670c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue