s3: Fix the talloc hierarchy in notify_remove_onelevel
authorVolker Lendecke <vl@samba.org>
Thu, 5 Nov 2009 13:29:05 +0000 (14:29 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Apr 2011 16:10:34 +0000 (18:10 +0200)
We want to free the record early, not when talloc_tos() is free'ed.
(cherry picked from commit cb5145e18aac219e27010637632f060c59852b7f)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/notify_internal.c

index 243335c9fc61eaa8b17b174c7dcc58715c6a474a..c8f8616d8b469a85a301bd2f25074c8631a82af7 100644 (file)
@@ -599,7 +599,7 @@ NTSTATUS notify_remove_onelevel(struct notify_context *notify,
        }
 
        rec = notify->db_onelevel->fetch_locked(
-               notify->db_onelevel, talloc_tos(),
+               notify->db_onelevel, array,
                make_tdb_data((uint8_t *)fid, sizeof(*fid)));
        if (rec == NULL) {
                DEBUG(10, ("notify_remove_onelevel: fetch_locked for %s failed"