summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_notify.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_notify.c b/source4/ntvfs/posix/pvfs_notify.c
index 652a5260d5..b5f2ad167a 100644
--- a/source4/ntvfs/posix/pvfs_notify.c
+++ b/source4/ntvfs/posix/pvfs_notify.c
@@ -109,11 +109,13 @@ static void pvfs_notify_callback(void *private, const struct notify_event *ev)
{
struct pvfs_notify_buffer *n = talloc_get_type(private, struct pvfs_notify_buffer);
size_t len;
+ char *new_path;
n->changes = talloc_realloc(n, n->changes, struct notify_changes, n->num_changes+1);
n->changes[n->num_changes].action = ev->action;
- n->changes[n->num_changes].name.s = talloc_strdup(n->changes, ev->path);
- string_replace(n->changes[n->num_changes].name.s, '/', '\\');
+ new_path = talloc_strdup(n->changes, ev->path);
+ string_replace(new_path, '/', '\\');
+ n->changes[n->num_changes].name.s = new_path;
n->num_changes++;
/*