solstice

Compute collected power and efficiencies of a solar plant
git clone git://git.meso-star.com/solstice.git
Log | Files | Refs | README | LICENSE

commit f705e54e5c3cc1b4cc44f9e4572d558a5a76b15e
parent 4eb2de95c2a7a33104a8cf1f6f4c9cf996c8b06a
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri,  5 May 2017 16:05:01 +0200

Fix a memleak.

Diffstat:
Msrc/parser/solparser.c | 4++++
Msrc/solstice.c | 1+
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/parser/solparser.c b/src/parser/solparser.c @@ -228,6 +228,10 @@ parser_clear(struct solparser* parser) solparser_sun_clear(&parser->sun); parser->sun_key = 0; + /* Atmosphere */ + solparser_atmosphere_clear(&parser->atmosphere); + parser->atmosphere_key = 0; + /* Entities */ htable_str2sols_clear(&parser->str2entities); darray_entity_clear(&parser->entities); diff --git a/src/solstice.c b/src/solstice.c @@ -652,6 +652,7 @@ solstice_release(struct solstice* solstice) if(solstice->ssol) SSOL(device_ref_put(solstice->ssol)); if(solstice->scene) SSOL(scene_ref_put(solstice->scene)); if(solstice->sun) SSOL(sun_ref_put(solstice->sun)); + if(solstice->atmosphere) SSOL(atmosphere_ref_put(solstice->atmosphere)); if(solstice->parser) solparser_ref_put(solstice->parser); if(solstice->camera) SSOL(camera_ref_put(solstice->camera)); if(solstice->framebuffer) SSOL(image_ref_put(solstice->framebuffer));