s3:printing: Fix a possible NULL dereference.
authorPoornima Gurusiddaiah <pgurusid@redhat.com>
Fri, 14 Feb 2014 03:27:12 +0000 (03:27 +0000)
committerIra Cooper <ira@samba.org>
Mon, 24 Feb 2014 04:21:31 +0000 (09:51 +0530)
Coverity-Id: 710708

Signed-off-by: Poornima Gurusiddaiah <pgurusid@redhat.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/printing/printspoolss.c

index 26d8a006460721ba17849a3efe8d26006c70f9ea..5dba6352d35742b4ba92036b797eb92a61a3418a 100644 (file)
@@ -248,7 +248,7 @@ done:
                        }
                }
                /* We need to delete the job from spoolss too */
-               if (pf->jobid) {
+               if (pf && pf->jobid) {
                        print_spool_terminate(fsp->conn, pf);
                }
        }