File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 77 * SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only)
88 */
99
10- #include < osquery/utils/scope_guard.h>
1110#include < IOKit/IOMessage.h>
11+ #include < osquery/utils/scope_guard.h>
1212
1313#include < osquery/core/tables.h>
1414#include < osquery/events/darwin/iokit.h>
@@ -24,9 +24,10 @@ struct DeviceTracker : private boost::noncopyable {
2424 public:
2525 explicit DeviceTracker (IOKitEventPublisher* p) : publisher(p) {}
2626 ~DeviceTracker () {
27- if (notification)
27+ if (notification)
2828 IOObjectRelease (notification);
2929 }
30+
3031 public:
3132 IOKitEventPublisher* publisher{nullptr };
3233 io_object_t notification{0 };
@@ -160,12 +161,13 @@ void IOKitEventPublisher::deviceAttach(void* refcon, io_iterator_t iterator) {
160161
161162 // Create a notification tracker.
162163 auto tracker = std::make_shared<struct DeviceTracker >(self);
163- auto kr = IOServiceAddInterestNotification (self->port_ ,
164- device,
165- kIOGeneralInterest ,
166- (IOServiceInterestCallback)deviceDetach,
167- tracker.get (),
168- &(tracker->notification ));
164+ auto kr = IOServiceAddInterestNotification (
165+ self->port_ ,
166+ device,
167+ kIOGeneralInterest ,
168+ (IOServiceInterestCallback)deviceDetach,
169+ tracker.get (),
170+ &(tracker->notification ));
169171 if (KERN_SUCCESS != kr) {
170172 continue ;
171173 }
You can’t perform that action at this time.
0 commit comments