summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/samr/samdb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/rpc_server/samr/samdb.c b/source4/rpc_server/samr/samdb.c
index 33c4eec86a..4160ef78fc 100644
--- a/source4/rpc_server/samr/samdb.c
+++ b/source4/rpc_server/samr/samdb.c
@@ -68,8 +68,7 @@ void *samdb_connect(TALLOC_CTX *mem_ctx)
second open due to the broken nature of unix locking.
*/
if (ctx != NULL) {
- talloc_increase_ref_count(ctx);
- return ctx;
+ return talloc_reference(mem_ctx, ctx);
}
ctx = talloc_p(mem_ctx, struct samdb_context);