diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2020-06-26 16:40:05 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@gmail.com> | 2020-09-22 21:23:04 +0000 |
commit | 5f4599d64959cb7f257ce9f0c62e6e10a79e1eff (patch) | |
tree | 10481e2ffe481ac0b4e4e5a3c86459a2dd46d354 | |
parent | f3bf0080d7a8b3bb3b8f3ffe212f3270f94cce33 (diff) | |
download | gnome-control-center-5f4599d64959cb7f257ce9f0c62e6e10a79e1eff.tar.gz |
printers: Don't pass GFile references around
An internal GTask will hold a reference to it for the duration of the async call.
-rw-r--r-- | panels/printers/pp-utils.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/panels/printers/pp-utils.c b/panels/printers/pp-utils.c index b62813009..ef11053e1 100644 --- a/panels/printers/pp-utils.c +++ b/panels/printers/pp-utils.c @@ -1539,7 +1539,6 @@ printer_set_ppd_file_async_scb (GObject *source_object, success = g_file_copy_finish (G_FILE (source_object), res, &error); - g_object_unref (source_object); if (!success) { @@ -1596,7 +1595,7 @@ printer_set_ppd_file_async (const gchar *printer_name, { g_autoptr(GFileIOStream) stream = NULL; PSPData *data; - GFile *source_ppd_file; + g_autoptr(GFile) source_ppd_file = NULL; g_autoptr(GFile) destination_ppd_file = NULL; data = g_new0 (PSPData, 1); |