summaryrefslogtreecommitdiff
path: root/source4/wrepl_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-05-07 15:19:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:09 -0500
commit68b531e81784d218b598e4ec403443bbc039ca77 (patch)
treee685ecad58c316d598db1cace2e6108845cd47a5 /source4/wrepl_server
parent56ab0cd77c7abf777ebe5666a47fa3affea7d2ae (diff)
downloadsamba-68b531e81784d218b598e4ec403443bbc039ca77.tar.gz
samba-68b531e81784d218b598e4ec403443bbc039ca77.tar.bz2
samba-68b531e81784d218b598e4ec403443bbc039ca77.zip
r22748: fix memleaks by passing an mem_ctx to
irpc_servers_byname() metze (This used to be commit b54584dfabee77ec7743cab431bda9765057a295)
Diffstat (limited to 'source4/wrepl_server')
-rw-r--r--source4/wrepl_server/wrepl_apply_records.c6
-rw-r--r--source4/wrepl_server/wrepl_scavenging.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/wrepl_server/wrepl_apply_records.c b/source4/wrepl_server/wrepl_apply_records.c
index f805d21dfe..033657987e 100644
--- a/source4/wrepl_server/wrepl_apply_records.c
+++ b/source4/wrepl_server/wrepl_apply_records.c
@@ -911,7 +911,7 @@ static NTSTATUS r_do_late_release_demand(struct r_do_challenge_state *state)
DEBUG(4,("late release demand record %s\n",
nbt_name_string(state, &state->replica.name)));
- nbt_servers = irpc_servers_byname(state->msg_ctx, "nbt_server");
+ nbt_servers = irpc_servers_byname(state->msg_ctx, state, "nbt_server");
if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) {
return NT_STATUS_INTERNAL_ERROR;
}
@@ -1051,7 +1051,7 @@ static NTSTATUS r_do_challenge(struct wreplsrv_partner *partner,
talloc_steal(state, replica->owner);
talloc_steal(state, replica->addresses);
- nbt_servers = irpc_servers_byname(state->msg_ctx, "nbt_server");
+ nbt_servers = irpc_servers_byname(state->msg_ctx, state, "nbt_server");
if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) {
return NT_STATUS_INTERNAL_ERROR;
}
@@ -1113,7 +1113,7 @@ static NTSTATUS r_do_release_demand(struct wreplsrv_partner *partner,
DEBUG(4,("release demand record %s\n",
nbt_name_string(mem_ctx, &replica->name)));
- nbt_servers = irpc_servers_byname(partner->service->task->msg_ctx, "nbt_server");
+ nbt_servers = irpc_servers_byname(partner->service->task->msg_ctx, mem_ctx, "nbt_server");
if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) {
return NT_STATUS_INTERNAL_ERROR;
}
diff --git a/source4/wrepl_server/wrepl_scavenging.c b/source4/wrepl_server/wrepl_scavenging.c
index e134e64c06..b75fa72abf 100644
--- a/source4/wrepl_server/wrepl_scavenging.c
+++ b/source4/wrepl_server/wrepl_scavenging.c
@@ -390,7 +390,7 @@ static NTSTATUS wreplsrv_scavenging_replica_active_records(struct wreplsrv_servi
struct verify_state *s;
struct server_id *nbt_servers;
- nbt_servers = irpc_servers_byname(service->task->msg_ctx, "nbt_server");
+ nbt_servers = irpc_servers_byname(service->task->msg_ctx, tmp_mem, "nbt_server");
if ((nbt_servers == NULL) || (nbt_servers[0].id == 0)) {
return NT_STATUS_INTERNAL_ERROR;
}