diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-12-07 19:02:10 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-12-10 13:53:46 +0100 |
commit | 6bcafceb750d5c4d24e2ddbef35b411bebccd66f (patch) | |
tree | acd838ebb98be35042bca31d05aa39cb4f49240c /source4 | |
parent | ade5bfd304cc806758a58f04b35834cd730dd9ba (diff) | |
download | samba-6bcafceb750d5c4d24e2ddbef35b411bebccd66f.tar.gz samba-6bcafceb750d5c4d24e2ddbef35b411bebccd66f.tar.bz2 samba-6bcafceb750d5c4d24e2ddbef35b411bebccd66f.zip |
s4:dsdb/dirsync: fix potential talloc hierachy problems (bug #9470)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/dirsync.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/dirsync.c b/source4/dsdb/samdb/ldb_modules/dirsync.c index f75ec521d3..e769948508 100644 --- a/source4/dsdb/samdb/ldb_modules/dirsync.c +++ b/source4/dsdb/samdb/ldb_modules/dirsync.c @@ -240,7 +240,7 @@ static int dirsync_filter_entry(struct ldb_request *req, talloc_steal(newmsg->elements, el->name); talloc_steal(newmsg->elements, el->values); - talloc_free(msg); + talloc_steal(newmsg->elements, msg); return ldb_module_send_entry(dsc->req, msg, controls); } @@ -653,6 +653,7 @@ skip_link: continue; } } + talloc_steal(newmsg->elements, msg); /* * Here we run through the list of attributes returned @@ -685,10 +686,9 @@ skip_link: if (val > dsc->highestUSN) { dsc->highestUSN = val; } - talloc_free(msg); return ldb_module_send_entry(dsc->req, newmsg, controls); } else { - talloc_free(msg); + talloc_free(newmsg); return LDB_SUCCESS; } } |