r7633: this patch started as an attempt to make the dcerpc code use a given
[samba.git] / source4 / utils / net / net_user.c
index b1bf85d6f2b3db0d8e3b2ecfb78ea67b5efc8fee..dabb4a0d61df473274f47dcf56cf8e6f4c40bc36 100644 (file)
@@ -44,7 +44,7 @@ static int net_user_add(struct net_context *ctx, int argc, const char **argv)
        }
 
        /* libnet context init and its params */
-       lnet_ctx = libnet_context_init();
+       lnet_ctx = libnet_context_init(NULL);
        if (!lnet_ctx) return -1;
 
        lnet_ctx->cred = ctx->credentials;
@@ -61,7 +61,7 @@ static int net_user_add(struct net_context *ctx, int argc, const char **argv)
                return -1;
        }
        
-       libnet_context_destroy(&lnet_ctx);
+       talloc_free(lnet_ctx);
        return 0;
 }