mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
s4: ntvfs: Add a TALLOC_CTX * to sys_notify_register().
Pass in the TALLOC_CTX * from the module init to remove another talloc_autofree_context() use. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
f0d8913a0f
commit
6f05597f5f
@ -394,5 +394,5 @@ NTSTATUS sys_notify_inotify_init(TALLOC_CTX *);
|
||||
NTSTATUS sys_notify_inotify_init(TALLOC_CTX *ctx)
|
||||
{
|
||||
/* register ourselves as a system inotify module */
|
||||
return sys_notify_register(&inotify);
|
||||
return sys_notify_register(ctx, &inotify);
|
||||
}
|
||||
|
@ -120,10 +120,11 @@ _PUBLIC_ NTSTATUS sys_notify_watch(struct sys_notify_context *ctx,
|
||||
/*
|
||||
register a notify backend
|
||||
*/
|
||||
_PUBLIC_ NTSTATUS sys_notify_register(struct sys_notify_backend *backend)
|
||||
_PUBLIC_ NTSTATUS sys_notify_register(TALLOC_CTX *ctx,
|
||||
struct sys_notify_backend *backend)
|
||||
{
|
||||
struct sys_notify_backend *b;
|
||||
b = talloc_realloc(talloc_autofree_context(), backends,
|
||||
b = talloc_realloc(ctx, backends,
|
||||
struct sys_notify_backend, num_backends+1);
|
||||
NT_STATUS_HAVE_NO_MEMORY(b);
|
||||
backends = b;
|
||||
|
@ -43,7 +43,8 @@ struct sys_notify_backend {
|
||||
notify_watch_t notify_watch;
|
||||
};
|
||||
|
||||
NTSTATUS sys_notify_register(struct sys_notify_backend *backend);
|
||||
NTSTATUS sys_notify_register(TALLOC_CTX *ctx,
|
||||
struct sys_notify_backend *backend);
|
||||
struct sys_notify_context *sys_notify_context_create(struct share_config *scfg,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user