From 1f0ebc321584e713f1090bda93d9c112a754e6e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 27 Jun 2022 01:17:09 +0200 Subject: GIMarshallingTests: Free and copy GStrv instances A GIMarshallingTestsBoxedStruct includes a GStrv, but we don't copy or free it properly. --- tests/gimarshallingtests.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index f7ebe709..b1c765c2 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -4054,6 +4054,7 @@ gi_marshalling_tests_boxed_struct_copy (GIMarshallingTestsBoxedStruct *struct_) *new_struct = *struct_; new_struct->string_ = g_strdup (struct_->string_); + new_struct->g_strv = g_strdupv (struct_->g_strv); return new_struct; } @@ -4064,6 +4065,7 @@ gi_marshalling_tests_boxed_struct_free (GIMarshallingTestsBoxedStruct *struct_) if (struct_ != NULL) { g_free (struct_->string_); + g_clear_pointer (&struct_->g_strv, g_strfreev); g_slice_free (GIMarshallingTestsBoxedStruct, struct_); } } -- cgit v1.2.1