From 17093a81491d871504d614bf211efe4346fbdeff Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 13 Feb 2017 23:08:54 -0800 Subject: [PATCH] GUACAMOLE-200: Kill any remaining print job when connection closes. --- src/protocols/rdp/guac_rdpdr/rdpdr_printer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c b/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c index cd7c517e..0545f891 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c @@ -179,10 +179,12 @@ static void guac_rdpdr_device_printer_iorequest_handler(guac_rdpdr_device* devic static void guac_rdpdr_device_printer_free_handler(guac_rdpdr_device* device) { - /* Close print job if open */ + /* Terminate and free print job if open */ guac_rdpdr_print_job* job = (guac_rdpdr_print_job*) device->data; - if (job != NULL) + if (job != NULL) { + guac_rdpdr_print_job_kill(job); guac_rdpdr_print_job_free(job); + } }