Fix Coverity ID 547
authorVolker Lendecke <vl@samba.org>
Fri, 21 Mar 2008 09:40:40 +0000 (10:40 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 21 Mar 2008 09:40:40 +0000 (10:40 +0100)
G√ľnther, please check. If r->in.ads==NULL, we can't call ads_leave_realm at
all.

Thanks,

Volker
(This used to be commit 120d8c889fa9ad61c74f1f936e83537513454648)

source3/libnet/libnet_join.c

index d3fba167d95c2a500e7f91cd9e47171b3d7e6db6..52376ac8218f21b677a27625dfc16cfa11679ab1 100644 (file)
@@ -264,10 +264,7 @@ static ADS_STATUS libnet_unjoin_remove_machine_acct(TALLOC_CTX *mem_ctx,
        ADS_STATUS status;
 
        if (!r->in.ads) {
-               status = libnet_unjoin_connect_ads(mem_ctx, r);
-               if (!ADS_ERR_OK(status)) {
-                       return status;
-               }
+               return libnet_unjoin_connect_ads(mem_ctx, r);
        }
 
        status = ads_leave_realm(r->in.ads, r->in.machine_name);