[gnome-control-center] printers: Replace D-Bus unrefs with g_autoptr
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] printers: Replace D-Bus unrefs with g_autoptr
- Date: Mon, 30 Mar 2020 03:29:03 +0000 (UTC)
commit e256dd57c3776e05296bd23a08571d421c729cbe
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Nov 21 22:06:40 2019 +1300
printers: Replace D-Bus unrefs with g_autoptr
This case could leak the GDBusConnection
panels/printers/pp-utils.c | 3 +--
1 file changed, 1 insertion(+), 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]