summaryrefslogtreecommitdiff
path: root/source4/wrepl_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-05-11 10:13:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:18 -0500
commitbb691629f5f29b61ee02bd9fd9c1d6c9e4905faf (patch)
tree23358ebda569b90499dea0bd2b9de12ef108fb0c /source4/wrepl_server
parent4ef7bab6d0dd64fc426508be164b3d3f24762b22 (diff)
downloadsamba-bb691629f5f29b61ee02bd9fd9c1d6c9e4905faf.tar.gz
samba-bb691629f5f29b61ee02bd9fd9c1d6c9e4905faf.tar.bz2
samba-bb691629f5f29b61ee02bd9fd9c1d6c9e4905faf.zip
r22792: only don't free on success
metze (This used to be commit 2259bc2cad3333d41a6972ad9659820f85906bba)
Diffstat (limited to 'source4/wrepl_server')
-rw-r--r--source4/wrepl_server/wrepl_apply_records.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/wrepl_server/wrepl_apply_records.c b/source4/wrepl_server/wrepl_apply_records.c
index 033657987e..a16817e6ff 100644
--- a/source4/wrepl_server/wrepl_apply_records.c
+++ b/source4/wrepl_server/wrepl_apply_records.c
@@ -1012,11 +1012,14 @@ static void r_do_challenge_handler(struct irpc_request *ireq)
}
if (!old_is_subset) {
- r_do_late_release_demand(state);
+ status = r_do_late_release_demand(state);
/*
- * don't free state here, because we pass it down,
+ * only free state on error, because we pass it down,
* and r_do_late_release_demand() will free it
*/
+ if (!NT_STATUS_IS_OK(status)) {
+ talloc_free(state);
+ }
return;
}