[krb5-auth-dialog] applet: Use g_autoptr()
- From: Guido Günther <guidog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [krb5-auth-dialog] applet: Use g_autoptr()
- Date: Fri, 14 Oct 2022 19:53:21 +0000 (UTC)
commit 7a96c49947b884a5c5891e4896452dacf57bdbeb
Author: Guido Günther <agx sigxcpu org>
Date: Thu Oct 13 14:05:54 2022 +0200
applet: Use g_autoptr()
Now easily possible G_DECLARE_FINAL_TYPE defines the cleanup for us.
src/ka-applet.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/ka-applet.c b/src/ka-applet.c
index b6bd05e..ae2693f 100644
--- a/src/ka-applet.c
+++ b/src/ka-applet.c
@@ -829,8 +829,7 @@ ka_applet_create (void)
int
main (int argc, char *argv[])
{
- KaApplet *applet;
- int ret = 0;
+ g_autoptr(KaApplet) applet = NULL;
textdomain (PACKAGE);
bind_textdomain_codeset (PACKAGE, "UTF-8");
@@ -845,9 +844,7 @@ main (int argc, char *argv[])
return 1;
setup_signal_handlers(applet);
- ret = g_application_run (G_APPLICATION(applet), argc, argv);
- g_object_unref (applet);
- return ret;
+ return g_application_run (G_APPLICATION(applet), argc, argv);
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]