From: Volker Lendecke Date: Mon, 13 Jun 2016 16:08:58 +0000 (+0200) Subject: smbd: "path" is no longer needed in notify_list X-Git-Tag: tdb-1.3.10~325 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=60fe61b3525cce154c4822148d523d0d79d9f5cc;p=thirdparty%2Fsamba.git smbd: "path" is no longer needed in notify_list Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/notify_msg.c b/source3/smbd/notify_msg.c index 572ec3e3236..817bc79a2f8 100644 --- a/source3/smbd/notify_msg.c +++ b/source3/smbd/notify_msg.c @@ -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;