diff options
author | Martin Pitt <martinpitt@gnome.org> | 2013-03-04 13:00:51 +0100 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2013-03-04 13:00:51 +0100 |
commit | 8c2129f22f6c3eb9eb89f36a59e151794edbf4bb (patch) | |
tree | d6dae5d44a1b47296837bc1c5480aeb702fe9f7d /tests/gimarshallingtests.c | |
parent | 3ff297fa04adf585ebf8c9d5593b71640649d9d1 (diff) | |
download | gobject-introspection-8c2129f22f6c3eb9eb89f36a59e151794edbf4bb.tar.gz |
tests: Fix memory leak in GIMarshallingTestsPropertiesObject
Free the some_strv property on finalization.
Detected by PyGObject's test_gi.TestPropertiesObject.test_strv test case.
Diffstat (limited to 'tests/gimarshallingtests.c')
-rw-r--r-- | tests/gimarshallingtests.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 4931778d..2851c4d1 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -4948,6 +4948,14 @@ static void gi_marshalling_tests_properties_object_init (GIMarshallingTestsPrope static void gi_marshalling_tests_properties_object_finalize (GObject *obj) { + GIMarshallingTestsPropertiesObject *self; + self = GI_MARSHALLING_TESTS_PROPERTIES_OBJECT (obj); + + if (self->some_strv != NULL) { + g_strfreev (self->some_strv); + self->some_strv = NULL; + } + G_OBJECT_CLASS (gi_marshalling_tests_properties_object_parent_class)->finalize (obj); } |