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

Commit

Permalink
Merge pull request #8 from atom/update-from-nsfw
Browse files Browse the repository at this point in the history
Update from nsfw/master to include memory leak fixes
  • Loading branch information
Antonio Scandurra authored Jun 13, 2019
2 parents 476e5be + 6b55b56 commit c762fed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/linux/InotifyEventLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ void InotifyEventLoop::work() {
}

if (isDirectoryEvent) {
inotifyService->createDirectory(event->wd, strdup(event->name));
inotifyService->createDirectory(event->wd, event->name);
} else {
inotifyService->create(event->wd, strdup(event->name));
inotifyService->create(event->wd, event->name);
}
};

Expand All @@ -49,7 +49,7 @@ void InotifyEventLoop::work() {
return;
}

inotifyService->modify(event->wd, strdup(event->name));
inotifyService->modify(event->wd, event->name);
};

auto remove = [&event, &isDirectoryRemoval, &inotifyService]() {
Expand All @@ -60,7 +60,7 @@ void InotifyEventLoop::work() {
if (isDirectoryRemoval) {
inotifyService->removeDirectory(event->wd);
} else {
inotifyService->remove(event->wd, strdup(event->name));
inotifyService->remove(event->wd, event->name);
}
};

Expand Down Expand Up @@ -133,7 +133,7 @@ void InotifyEventLoop::work() {

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

0 comments on commit c762fed

Please sign in to comment.