diff options
author | Volker Lendecke <vl@samba.org> | 2012-03-14 11:30:28 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-03-15 12:43:41 +0100 |
commit | 21f72a1ac3055be4128e96e7e0c457895b61a6a0 (patch) | |
tree | e3f373f07b2919c8ae6ac69d4352dac8b1f944f6 /source3/smbd | |
parent | f69c6920d400acc3a31b778ab6cdb6b7da67adef (diff) | |
download | samba-21f72a1ac3055be4128e96e7e0c457895b61a6a0.tar.gz samba-21f72a1ac3055be4128e96e7e0c457895b61a6a0.tar.xz samba-21f72a1ac3055be4128e96e7e0c457895b61a6a0.zip |
s3: Use talloc_tos() in notify_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Mar 15 12:43:41 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/notify_internal.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c index 7891601bfe7..d442367b2b0 100644 --- a/source3/smbd/notify_internal.c +++ b/source3/smbd/notify_internal.c @@ -817,24 +817,20 @@ static NTSTATUS notify_send(struct notify_context *notify, struct notify_entry * DATA_BLOB data; NTSTATUS status; enum ndr_err_code ndr_err; - TALLOC_CTX *tmp_ctx; ev.action = action; ev.path = path; ev.private_data = e->private_data; - tmp_ctx = talloc_new(notify); - - ndr_err = ndr_push_struct_blob(&data, tmp_ctx, &ev, + ndr_err = ndr_push_struct_blob(&data, talloc_tos(), &ev, (ndr_push_flags_fn_t)ndr_push_notify_event); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - talloc_free(tmp_ctx); return ndr_map_error2ntstatus(ndr_err); } status = messaging_send(notify->messaging_ctx, e->server, MSG_PVFS_NOTIFY, &data); - talloc_free(tmp_ctx); + TALLOC_FREE(data.data); return status; } |