feedback-profile: Don't leak json array when serializing profile
json_array_add_element doesn't transfer ownership
This commit is contained in:
@@ -58,7 +58,7 @@ fbd_feedback_profile_serializable_serialize_property (JsonSerializable *serializ
|
||||
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->feedbacks);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&key, (gpointer *) &profile)) {
|
||||
|
||||
Reference in New Issue
Block a user