aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test cases/frameworks/7 gnome/gir/prog.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/test cases/frameworks/7 gnome/gir/prog.c b/test cases/frameworks/7 gnome/gir/prog.c
index 1116285..c855a6b 100644
--- a/test cases/frameworks/7 gnome/gir/prog.c
+++ b/test cases/frameworks/7 gnome/gir/prog.c
@@ -6,18 +6,26 @@ gint
main (gint argc,
gchar *argv[])
{
- g_autoptr(GError) error = NULL;
+ GError * error = NULL;
- g_autoptr(GOptionContext) ctx = g_option_context_new (NULL);
+ GOptionContext * ctx = g_option_context_new (NULL);
g_option_context_add_group (ctx, g_irepository_get_option_group ());
if (!g_option_context_parse (ctx, &argc, &argv, &error)) {
g_print ("sample: %s\n", error->message);
+ g_option_context_free (ctx);
+ if (error) {
+ g_error_free (error);
+ }
+
return 1;
}
- g_autoptr(MesonSample) i = meson_sample_new ("Hello, meson/c!");
+ MesonSample * i = meson_sample_new ("Hello, meson/c!");
meson_sample_print_message (i);
+ g_object_unref (i);
+ g_option_context_free (ctx);
+
return 0;
}