mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
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
This commit is contained in:
parent
4e1b73325d
commit
083f834dd7
@ -1130,12 +1130,13 @@ _post_check (GtkCupsRequest *request)
|
|||||||
}
|
}
|
||||||
|
|
||||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||||
|
request->last_status = HTTP_CONTINUE;
|
||||||
|
|
||||||
httpFlush (request->http);
|
httpFlush (request->http);
|
||||||
|
if (request->own_http)
|
||||||
request->last_status = HTTP_CONTINUE;
|
|
||||||
httpClose (request->http);
|
httpClose (request->http);
|
||||||
request->http = NULL;
|
request->http = NULL;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1398,12 +1399,14 @@ _get_check (GtkCupsRequest *request)
|
|||||||
}
|
}
|
||||||
|
|
||||||
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
request->poll_state = GTK_CUPS_HTTP_IDLE;
|
||||||
httpFlush (request->http);
|
|
||||||
httpClose (request->http);
|
|
||||||
request->last_status = HTTP_CONTINUE;
|
request->last_status = HTTP_CONTINUE;
|
||||||
request->http = NULL;
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
httpFlush (request->http);
|
||||||
|
if (request->own_http)
|
||||||
|
httpClose (request->http);
|
||||||
|
request->http = NULL;
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user