From: Volker Lendecke Date: Mon, 26 May 2025 09:53:31 +0000 (+0200) Subject: smbd: Initialize all members of struct inotify_watch_context X-Git-Tag: tevent-0.17.0~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a8980e68d3a20c40b386e2a262834715efcf7823;p=thirdparty%2Fsamba.git smbd: Initialize all members of struct inotify_watch_context We don't have talloc_zero() Bug: https://bugzilla.samba.org/show_bug.cgi?id=15864 Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c index 8645579e107..b6ff4139911 100644 --- a/source3/smbd/notify_inotify.c +++ b/source3/smbd/notify_inotify.c @@ -421,12 +421,15 @@ int inotify_watch(TALLOC_CTX *mem_ctx, return ENOMEM; } - w->in = in; - w->callback = callback; - w->private_data = private_data; - w->mask = mask; - w->filter = orig_filter; - w->path = talloc_strdup(w, path); + *w = (struct inotify_watch_context) { + .in = in, + .callback = callback, + .private_data = private_data, + .mask = mask, + .filter = orig_filter, + .path = talloc_strdup(w, path), + }; + if (w->path == NULL) { *filter = orig_filter; TALLOC_FREE(w);