diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-05-03 07:35:57 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-05-03 07:44:38 -0400 |
commit | f472cb53ae89e8c615c33b398d0d7f5be0e29763 (patch) | |
tree | ff8bb08a2f8683a5d82d739a70854465eea92330 /modules | |
parent | a49ff5a1c433888b7d514265c2a3eb18ce91fd00 (diff) | |
download | gtk+-f472cb53ae89e8c615c33b398d0d7f5be0e29763.tar.gz |
printbackendlpr: Static analysis fixes
Diffstat (limited to 'modules')
-rw-r--r-- | modules/printbackends/gtkprintbackendlpr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/printbackends/gtkprintbackendlpr.c b/modules/printbackends/gtkprintbackendlpr.c index ea7770f5a9..44c40a1626 100644 --- a/modules/printbackends/gtkprintbackendlpr.c +++ b/modules/printbackends/gtkprintbackendlpr.c @@ -336,18 +336,13 @@ gtk_print_backend_lpr_print_stream (GtkPrintBackend *print_backend, NULL, NULL, &print_error)) - goto out; + goto out; ps->in = g_io_channel_unix_new (in_fd); g_io_channel_set_encoding (ps->in, NULL, &print_error); if (print_error != NULL) - { - if (ps->in != NULL) - g_io_channel_unref (ps->in); - - goto out; - } + goto out; g_io_channel_set_close_on_unref (ps->in, TRUE); @@ -362,9 +357,14 @@ gtk_print_backend_lpr_print_stream (GtkPrintBackend *print_backend, if (print_error != NULL) { - lpr_print_cb (GTK_PRINT_BACKEND_LPR (print_backend), - print_error, ps); + lpr_print_cb (GTK_PRINT_BACKEND_LPR (print_backend), print_error, ps); g_error_free (print_error); + + if (ps->in != NULL) + g_io_channel_unref (ps->in); + if (ps->job) + g_object_unref (ps->job); + g_free (ps); } } |