[gtk+/gtk-3-8] gtkprintbackendcups: Fix a crash in gtk_print_backend_cups_finalize()
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-8] gtkprintbackendcups: Fix a crash in gtk_print_backend_cups_finalize()
- Date: Mon, 25 Mar 2013 13:42:31 +0000 (UTC)
commit 42650a2a3f945c33d3eccdd4be9a09e6d8264a27
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Mon Mar 25 12:09:52 2013 +0100
gtkprintbackendcups: Fix a crash in gtk_print_backend_cups_finalize()
If GtkPrintBackendCups is finalized and cups_get_printer_list hasn't
been called, g_object_unref is called for the GDBusConnection pointer
that is NULL. Use g_clear_object() instead.
https://bugzilla.gnome.org/show_bug.cgi?id=696546
modules/printbackends/cups/gtkprintbackendcups.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c
b/modules/printbackends/cups/gtkprintbackendcups.c
index 64b92bc..45aa007 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -852,7 +852,7 @@ gtk_print_backend_cups_finalize (GObject *object)
g_clear_object (&backend_cups->avahi_cancellable);
g_clear_pointer (&backend_cups->avahi_default_printer, g_free);
- g_object_unref (backend_cups->dbus_connection);
+ g_clear_object (&backend_cups->dbus_connection);
#endif
backend_parent_class->finalize (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]