smbd: "path" is no longer needed in notify_list
authorVolker Lendecke <vl@samba.org>
Mon, 13 Jun 2016 16:08:58 +0000 (18:08 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 20 Jul 2016 03:21:06 +0000 (05:21 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/notify_msg.c

index 572ec3e3236168be290fc204a42c070ef62e8b76..817bc79a2f826c8db6d55399362f2a2aa2c1633f 100644 (file)
@@ -35,7 +35,6 @@ struct notify_list {
        void (*callback)(void *private_data, struct timespec when,
                         const struct notify_event *ctx);
        void *private_data;
-       char path[1];
 };
 
 struct notify_context {
@@ -142,14 +141,12 @@ NTSTATUS notify_add(struct notify_context *ctx,
 
        pathlen = strlen(path)+1;
 
-       listel = (struct notify_list *)talloc_size(
-               ctx, offsetof(struct notify_list, path) + pathlen);
+       listel = (struct notify_list *)talloc(ctx, struct notify_list);
        if (listel == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
        listel->callback = callback;
        listel->private_data = private_data;
-       memcpy(listel->path, path, pathlen);
 
        clock_gettime_mono(&msg.instance.creation_time);
        msg.instance.filter = filter;