Skip to content

Commit

Permalink
gn_config_free updated to correctly remove object and component keys
Browse files Browse the repository at this point in the history
Signed-off-by: spagadar <srikanth.pagadarai@analog.com>
  • Loading branch information
SrikanthPagadarai committed Jul 10, 2024
1 parent a105928 commit 8ab92b6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions bindings/c/src/cgenalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
extern "C" {
int gn_config_free(gn_config *c)
{
if (!((*c)->obj_key))
if ((*c)->obj_key){
gn_mgr_remove((*c)->obj_key);
free((*c)->obj_key);
if (!((*c)->comp_key))
}
if ((*c)->comp_key){
gn_fa_remove_comp((*c)->obj_key, (*c)->comp_key);
free((*c)->comp_key);
if (!((*c)->tone_freq))
free((*c)->tone_freq);
if (!((*c)->tone_ampl))
free((*c)->tone_ampl);
if (!((*c)->tone_phase))
free((*c)->tone_phase);
}
if (((*c)->_fa_results_size) > 0)
{
for (size_t i = 0; i < (*c)->_fa_results_size; i++)
Expand Down

0 comments on commit 8ab92b6

Please sign in to comment.