File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ unsigned char FSEventStreamStart(FSEventStreamRef stream);
8585void FSEventStreamStop (FSEventStreamRef stream );
8686void FSEventStreamInvalidate (FSEventStreamRef stream );
8787void FSEventStreamRelease (FSEventStreamRef stream );
88+ void CFRelease (CFStringRef cf );
8889
8990#endif /* !clang */
9091#endif /* FSM_DARWIN_GCC_H */
Original file line number Diff line number Diff line change @@ -455,6 +455,13 @@ int fsm_listen__ctor(struct fsmonitor_daemon_state *state)
455455failed :
456456 error (_ ("Unable to create FSEventStream." ));
457457
458+ if (data -> cfar_paths_to_watch )
459+ CFRelease (data -> cfar_paths_to_watch );
460+ if (data -> cfsr_gitdir_path )
461+ CFRelease (data -> cfsr_gitdir_path );
462+ if (data -> cfsr_worktree_path )
463+ CFRelease (data -> cfsr_worktree_path );
464+
458465 FREE_AND_NULL (state -> listen_data );
459466 return -1 ;
460467}
@@ -476,6 +483,13 @@ void fsm_listen__dtor(struct fsmonitor_daemon_state *state)
476483 FSEventStreamRelease (data -> stream );
477484 }
478485
486+ if (data -> cfar_paths_to_watch )
487+ CFRelease (data -> cfar_paths_to_watch );
488+ if (data -> cfsr_gitdir_path )
489+ CFRelease (data -> cfsr_gitdir_path );
490+ if (data -> cfsr_worktree_path )
491+ CFRelease (data -> cfsr_worktree_path );
492+
479493 if (data -> dq )
480494 dispatch_release (data -> dq );
481495 pthread_cond_destroy (& data -> dq_finished );
You can’t perform that action at this time.
0 commit comments