Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit c762fed

Browse files
author
Antonio Scandurra
authored
Merge pull request #8 from atom/update-from-nsfw
Update from nsfw/master to include memory leak fixes
2 parents 476e5be + 6b55b56 commit c762fed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/linux/InotifyEventLoop.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ void InotifyEventLoop::work() {
3838
}
3939

4040
if (isDirectoryEvent) {
41-
inotifyService->createDirectory(event->wd, strdup(event->name));
41+
inotifyService->createDirectory(event->wd, event->name);
4242
} else {
43-
inotifyService->create(event->wd, strdup(event->name));
43+
inotifyService->create(event->wd, event->name);
4444
}
4545
};
4646

@@ -49,7 +49,7 @@ void InotifyEventLoop::work() {
4949
return;
5050
}
5151

52-
inotifyService->modify(event->wd, strdup(event->name));
52+
inotifyService->modify(event->wd, event->name);
5353
};
5454

5555
auto remove = [&event, &isDirectoryRemoval, &inotifyService]() {
@@ -60,7 +60,7 @@ void InotifyEventLoop::work() {
6060
if (isDirectoryRemoval) {
6161
inotifyService->removeDirectory(event->wd);
6262
} else {
63-
inotifyService->remove(event->wd, strdup(event->name));
63+
inotifyService->remove(event->wd, event->name);
6464
}
6565
};
6666

@@ -133,7 +133,7 @@ void InotifyEventLoop::work() {
133133

134134
renameStart();
135135
} else if (event->mask & (uint32_t)IN_MOVE_SELF) {
136-
inotifyService->remove(event->wd, strdup(event->name));
136+
inotifyService->remove(event->wd, event->name);
137137
inotifyService->removeDirectory(event->wd);
138138
}
139139
} while((position += sizeof(struct inotify_event) + event->len) < bytesRead);

0 commit comments

Comments
 (0)