After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696546 - gtk_print_backend_cups_finalize() crashes if cups_get_printer_list() is not called
gtk_print_backend_cups_finalize() crashes if cups_get_printer_list() is not c...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-03-25 11:17 UTC by Carlos Garcia Campos
Modified: 2013-03-25 13:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use g_clear_object() instead. (1.13 KB, patch)
2013-03-25 11:17 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2013-03-25 11:17:11 UTC
Created attachment 239748 [details] [review]
Use g_clear_object() instead.

It tries to unref the GDBusConnection that is NULL.

  • #0 g_logv
    at gmessages.c line 981
  • #1 g_log
    at gmessages.c line 1010
  • #2 g_return_if_fail_warning
  • #3 g_object_unref
    at gobject.c line 2917
  • #4 gtk_print_backend_cups_finalize
    at gtkprintbackendcups.c line 855
  • #5 g_object_unref
    at gobject.c line 3024
  • #6 list_printers_remove_backend
    at gtkprinter.c line 1159
  • #7 list_done_cb
    at gtkprinter.c line 1173
  • #8 stop_enumeration
    at gtkprinter.c line 1105
  • #9 list_added_cb
    at gtkprinter.c line 1131
  • #10 list_printers_init
    at gtkprinter.c line 1187
  • #11 gtk_enumerate_printers
  • #12 testPrintOperationPrint(PrintTest*, void const*)
  • #13 test_case_run
    at gtestutils.c line 1714
  • #14 g_test_run_suite_internal
    at gtestutils.c line 1767
  • #15 g_test_run_suite_internal
    at gtestutils.c line 1778
  • #16 g_test_run_suite_internal
    at gtestutils.c line 1778
  • #17 g_test_run_suite
    at gtestutils.c line 1823
  • #18 g_test_run
    at gtestutils.c line 1324
  • #19 main

Comment 1 Marek Kašík 2013-03-25 12:48:17 UTC
Review of attachment 239748 [details] [review]:

Thank you for catching this.
Comment 2 Carlos Garcia Campos 2013-03-25 13:43:09 UTC
Comment on attachment 239748 [details] [review]
Use g_clear_object() instead.

Pushed to both branches.