diff options
author | Marek Kasik <mkasik@redhat.com> | 2013-12-12 18:11:39 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-12-14 16:33:02 -0500 |
commit | 083f834dd742c53f47864d7c181c868426f57bc0 (patch) | |
tree | 02a76d1ebb73976cfdd99a05720481a929d16df5 /modules | |
parent | 4e1b73325d41fc9d709e89a7bec3fc5303135d2e (diff) | |
download | gtk+-083f834dd742c53f47864d7c181c868426f57bc0.tar.gz |
printing: Don't double free connection to CUPS
Don't call httpClose() on http connections which are created
outside of GtkCupsRequest in GtkCupsRequest's functions.
https://bugzilla.gnome.org/show_bug.cgi?id=720338
Diffstat (limited to 'modules')
-rw-r--r-- | modules/printbackends/cups/gtkcupsutils.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/modules/printbackends/cups/gtkcupsutils.c b/modules/printbackends/cups/gtkcupsutils.c index f0bb951b5d..da3436efb8 100644 --- a/modules/printbackends/cups/gtkcupsutils.c +++ b/modules/printbackends/cups/gtkcupsutils.c @@ -1130,13 +1130,14 @@ _post_check (GtkCupsRequest *request) } request->poll_state = GTK_CUPS_HTTP_IDLE; - - httpFlush (request->http); - request->last_status = HTTP_CONTINUE; - httpClose (request->http); + + httpFlush (request->http); + if (request->own_http) + httpClose (request->http); request->http = NULL; - return; + + return; } else { @@ -1398,12 +1399,14 @@ _get_check (GtkCupsRequest *request) } request->poll_state = GTK_CUPS_HTTP_IDLE; - httpFlush (request->http); - httpClose (request->http); request->last_status = HTTP_CONTINUE; + + httpFlush (request->http); + if (request->own_http) + httpClose (request->http); request->http = NULL; - return; + return; } else { |