Move talloc_init to the right place in "net ads join".
authorGünther Deschner <gd@samba.org>
Tue, 4 Mar 2008 10:04:36 +0000 (11:04 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 4 Mar 2008 10:04:36 +0000 (11:04 +0100)
Guenther

source/utils/net_ads.c

index 9358a4f18404bb59e9286ed9da6fc606de350bae..46e0a2591bb9adc8d30aaec5f035f8f3fa31f1e1 100644 (file)
@@ -1121,6 +1121,12 @@ int net_ads_join(int argc, const char **argv)
                goto fail;
        }
 
+       if (!(ctx = talloc_init("net_ads_join"))) {
+               d_fprintf(stderr, "Could not initialise talloc context.\n");
+               werr = WERR_NOMEM;
+               goto fail;
+       }
+
        use_in_memory_ccache();
 
        werr = libnet_init_JoinCtx(ctx, &r);
@@ -1128,12 +1134,6 @@ int net_ads_join(int argc, const char **argv)
                goto fail;
        }
 
-       if (!(ctx = talloc_init("net_ads_join"))) {
-               d_fprintf(stderr, "Could not initialise talloc context.\n");
-               werr = WERR_NOMEM;
-               goto fail;
-       }
-
        /* process additional command line args */
 
        for ( i=0; i<argc; i++ ) {