From 94e83e385e5ba66f1415164214f7afd5e4ad7536 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 22 Dec 2010 11:34:22 +0100 Subject: s3-printing: fix crash bug in print_spool_open(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Autobuild-User: Günther Deschner Autobuild-Date: Wed Dec 22 14:21:58 CET 2010 on sn-devel-104 --- source3/printing/printspoolss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/printing') diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c index 8426b84fec..8effb6ec48 100644 --- a/source3/printing/printspoolss.c +++ b/source3/printing/printspoolss.c @@ -208,7 +208,9 @@ done: if (!NT_STATUS_IS_OK(status)) { if (fd != -1) { close(fd); - unlink(fsp->print_file->filename); + if (fsp->print_file) { + unlink(fsp->print_file->filename); + } } /* We need to delete the job from spoolss too */ if (pf->jobid) { -- cgit