feedback-theme: Don't leak json array when serializing profile
json_array_add_element doesn't transfer ownership.
This commit is contained in:
@@ -53,7 +53,7 @@ fbd_theme_serializable_serialize_property (JsonSerializable *serializable,
|
||||
GHashTableIter iter;
|
||||
gpointer key;
|
||||
FbdFeedbackProfile *profile;
|
||||
JsonArray *array = json_array_sized_new (FBD_FEEDBACK_PROFILE_N_PROFILES);
|
||||
g_autoptr (JsonArray) array = json_array_sized_new (FBD_FEEDBACK_PROFILE_N_PROFILES);
|
||||
|
||||
g_hash_table_iter_init (&iter, self->profiles);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&key, (gpointer *) &profile)) {
|
||||
|
||||
Reference in New Issue
Block a user