stardis-solver

Solve coupled heat transfers
git clone git://git.meso-star.fr/stardis-solver.git
Log | Files | Refs | README | LICENSE

commit 695668685b0badc7d8dfc38c37c29e3f3ab36058
parent 381a8f39f14bd11052935113a4f8cf0edfda53f1
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Tue, 19 Nov 2019 14:50:34 +0100

Fix memleaks.

Diffstat:
Msrc/sdis_scene_Xd.h | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/sdis_scene_Xd.h b/src/sdis_scene_Xd.h @@ -896,6 +896,8 @@ XD(setup_enclosures)(struct sdis_scene* scn, struct sencXd(descriptor)* desc) double tmp[DIM]; unsigned indices[DIM]; unsigned i; + log_warn(scn->dev, "# Found internal enclosure with %u materials:\n", + header.enclosed_media_count); #if DIM == 2 FOR_EACH(i, 0, header.vertices_count) { SENCXD(enclosure_get_vertex(enc, i, tmp)); @@ -917,6 +919,8 @@ XD(setup_enclosures)(struct sdis_scene* scn, struct sencXd(descriptor)* desc) } #endif #endif + SENCXD(enclosure_ref_put(enc)); + enc = NULL; res = RES_BAD_ARG; goto error; } @@ -1012,6 +1016,7 @@ exit: if(out_scn) *out_scn = scn; return res; error: + if(desc) SENCXD(descriptor_ref_put(desc)); if(scn) { SDIS(scene_ref_put(scn)); scn = NULL;