r5941: Commit this patch much earlier than I would normally prefer, but metze needs...
[kai/samba.git] / source4 / torture / rpc / srvsvc.c
index 697ae4afe7865b7f2ce8eb3bb44507d9ac56bfec..c12504e646947298b559104f050ab4b8c7846359 100644 (file)
@@ -720,11 +720,13 @@ BOOL torture_rpc_srvsvc(void)
 
        mem_ctx = talloc_init("torture_rpc_srvsvc");
 
-       status = torture_rpc_connection(&p,
+       status = torture_rpc_connection(mem_ctx, 
+                                       &p,
                                        DCERPC_SRVSVC_NAME,
                                        DCERPC_SRVSVC_UUID,
                                        DCERPC_SRVSVC_VERSION);
        if (!NT_STATUS_IS_OK(status)) {
+               talloc_free(mem_ctx);
                return False;
        }
 
@@ -774,7 +776,5 @@ BOOL torture_rpc_srvsvc(void)
 
        talloc_free(mem_ctx);
 
-        torture_rpc_close(p);
-
        return ret;
 }