Skip to content

Commit d197487

Browse files
authored
fix: memory leak in watchdog_fsevents.c (#1114)
1 parent 52e3708 commit d197487

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/watchdog_fsevents.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,9 @@ watchdog_FSEventStreamCallback(ConstFSEventStreamRef stream_ref,
446446
CFRunLoopStop(stream_callback_info_ref->run_loop_ref);
447447
}
448448

449+
/* Clean up callback result reference */
450+
Py_XDECREF(callback_result);
451+
449452
/* Release the lock and restore thread state. */
450453
PyThreadState_Swap(saved_thread_state);
451454
PyGILState_Release(gil_state);

0 commit comments

Comments
 (0)