summaryrefslogtreecommitdiff
path: root/panels/printers
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2019-11-21 22:06:40 +1300
committerRobert Ancell <robert.ancell@gmail.com>2020-03-30 03:24:58 +0000
commite256dd57c3776e05296bd23a08571d421c729cbe (patch)
tree6bacdfc6e59b234c722e4822c5e28f3d4837e24b /panels/printers
parent6b79e7ffa168f89ddae6c12840cb6fba55e6b2ba (diff)
downloadgnome-control-center-e256dd57c3776e05296bd23a08571d421c729cbe.tar.gz
printers: Replace D-Bus unrefs with g_autoptr
This case could leak the GDBusConnection
Diffstat (limited to 'panels/printers')
-rw-r--r--panels/printers/pp-utils.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c
index 19857a942..933a71f9e 100644
--- a/panels/printers/pp-utils.c
+++ b/panels/printers/pp-utils.c
@@ -258,7 +258,7 @@ printer_rename (const gchar *old_name,
cups_dest_t *dests = NULL;
cups_dest_t *dest = NULL;
cups_job_t *jobs = NULL;
- GDBusConnection *bus;
+ g_autoptr(GDBusConnection) bus = NULL;
const gchar *printer_location = NULL;
const gchar *printer_info = NULL;
const gchar *printer_uri = NULL;
@@ -477,7 +477,6 @@ printer_rename (const gchar *old_name,
-1,
NULL,
&add_error);
- g_object_unref (bus);
if (output)
{