summaryrefslogtreecommitdiff
path: root/gtk/gtkprintoperation-unix.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-05-03 07:35:03 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-05-03 07:44:38 -0400
commite510538f37a7eef66839a6835afe1e4adb6e76f9 (patch)
treea2e8ddf280233cb451469b33fc287b49a112971b /gtk/gtkprintoperation-unix.c
parentb2bf48c3f006b3268f2f379098976d970e400ed2 (diff)
downloadgtk+-e510538f37a7eef66839a6835afe1e4adb6e76f9.tar.gz
printoperation: Static analysis fixes
Diffstat (limited to 'gtk/gtkprintoperation-unix.c')
-rw-r--r--gtk/gtkprintoperation-unix.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c
index c75641f887..2f95d848d4 100644
--- a/gtk/gtkprintoperation-unix.c
+++ b/gtk/gtkprintoperation-unix.c
@@ -1080,7 +1080,7 @@ find_printer_idle (gpointer data)
printer = NULL;
finder->func (printer, finder->data);
-
+
printer_finder_free (finder);
return G_SOURCE_REMOVE;
@@ -1204,7 +1204,7 @@ printer_finder_free (PrinterFinder *finder)
g_free (finder);
}
-static void
+static void
find_printer (const char *printer,
GFunc func,
gpointer data)
@@ -1217,7 +1217,7 @@ find_printer (const char *printer,
finder->printer_name = g_strdup (printer);
finder->func = func;
finder->data = data;
-
+
finder->backends = NULL;
if (g_module_supported ())
finder->backends = gtk_print_backend_load_modules ();
@@ -1230,6 +1230,8 @@ find_printer (const char *printer,
if (finder->backends == NULL && !finder->found_printer)
g_idle_add (find_printer_idle, finder);
+ else
+ printer_finder_free (finder);
}