commit b68be36f31806e3515c6a4b643eda84b2706ff71
parent fcb7e9e8782548326764bf01c85d8c0932b350c9
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 20 Jul 2022 11:55:09 +0200
Fix error handling when loading aerosol properties
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/rnatm_properties.c b/src/rnatm_properties.c
@@ -217,6 +217,7 @@ exit:
*out_phase_fn = phase_fn;
return res;
error:
+ if(phase_fn) { RNSF(ref_put(phase_fn)); phase_fn = NULL; }
goto exit;
}
@@ -291,6 +292,7 @@ exit:
if(txtrdr) txtrdr_ref_put(txtrdr);
return res;
error:
+ darray_phase_fn_clear(&aerosol->phase_fn_lst);
goto exit;
}