Skip to content

Commit

Permalink
Add missing function calls to free the memory used by the GVariant
Browse files Browse the repository at this point in the history
data structure.

Signed-off-by: Guido Trentalancia <[email protected]>
---
 show.c |    2 ++
 1 file changed, 2 insertions(+)
  • Loading branch information
gtrentalancia committed Nov 18, 2018
1 parent c614dc6 commit bc9dc2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions show.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ void show_dev_detail(void)
for (i = 0; i < num_elements; i++) {
gvar = g_variant_get_child_value(gvar_list, i);
g_variant_get(gvar, "(tt)", &p, &q);
g_variant_unref(gvar);
if (srci->datatype == SR_T_RATIONAL_PERIOD)
s = sr_period_string(p, q);
else
Expand Down Expand Up @@ -699,6 +700,7 @@ void show_dev_detail(void)
printf(" ");
gvar = g_variant_get_child_value(gvar_list, i);
g_variant_get(gvar, "(ut)", &mq, &mqflags);
g_variant_unref(gvar);
if ((srmqi = sr_key_info_get(SR_KEY_MQ, mq)))
printf("%s", srmqi->id);
else
Expand Down

0 comments on commit bc9dc2a

Please sign in to comment.