From dc9fa1a026e9cd543a53b9ca72b0c52e1740c2e4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 10 Dec 2012 13:22:52 +0100 Subject: torture: Fix torture_rpc_spoolss_printer_teardown_common(). Found by Coverity. Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- source4/torture/rpc/spoolss.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 6e0d9edcf8..b1229ac3aa 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -7646,11 +7646,9 @@ static bool torture_rpc_spoolss_printer_teardown_common(struct torture_context * "failed to remove printer driver"); } - if (p) { + if (p && !t->wellknown) { b = p->binding_handle; - } - if (!t->wellknown) { torture_assert(tctx, test_DeletePrinter(tctx, b, &t->handle), "failed to delete printer"); -- cgit