m-mixer-api: unset iterator value before breaking or returning from loop

This commit is contained in:
Julian Bouzas
2021-12-13 11:03:09 -05:00
committed by George Kiagiadakis
parent c61ab61ece
commit 86d85584b2

View File

@@ -210,6 +210,7 @@ collect_node_info (WpMixerApi * self, struct node_info *info,
info->route_index = r_index; info->route_index = r_index;
info->route_device = r_device; info->route_device = r_device;
have_volume = TRUE; have_volume = TRUE;
g_value_unset (&val);
break; break;
} }
} }
@@ -222,11 +223,13 @@ collect_node_info (WpMixerApi * self, struct node_info *info,
it = wp_pipewire_object_enum_params_sync (node, "Props", NULL); it = wp_pipewire_object_enum_params_sync (node, "Props", NULL);
for (; it && wp_iterator_next (it, &val); g_value_unset (&val)) { for (; it && wp_iterator_next (it, &val); g_value_unset (&val)) {
WpSpaPod *param = g_value_get_boxed (&val); WpSpaPod *param = g_value_get_boxed (&val);
if (node_info_fill (info, param)) if (node_info_fill (info, param)) {
g_value_unset (&val);
break; break;
} }
} }
} }
}
static void on_objects_changed (WpObjectManager * om, WpMixerApi * self); static void on_objects_changed (WpObjectManager * om, WpMixerApi * self);