s3-printing: Don't call talloc_free on an uninitialized pointer.
authorAndreas Schneider <asn@samba.org>
Mon, 10 Dec 2012 12:42:37 +0000 (13:42 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 12 Dec 2012 08:42:32 +0000 (09:42 +0100)
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/printing/nt_printing.c

index 5050a5d..252fbb8 100644 (file)
@@ -1222,7 +1222,7 @@ bool printer_driver_in_use(TALLOC_CTX *mem_ctx,
        DEBUG(10,("printer_driver_in_use: Completed search through ntprinters.tdb...\n"));
 
        if ( in_use ) {
-               struct spoolss_DriverInfo8 *driver;
+               struct spoolss_DriverInfo8 *driver = NULL;
                WERROR werr;
 
                DEBUG(5,("printer_driver_in_use: driver \"%s\" is currently in use\n", r->driver_name));