The branch, hooks has been updated
       via  e94d513c27b8aaddf15c32ea7d786ea4cde611b5 (commit)
      from  801f36c25dae91f64554f5e4f1bc22bfa731b5b6 (commit)

- Log -----------------------------------------------------------------
commit e94d513c27b8aaddf15c32ea7d786ea4cde611b5
Author: Thomas Adam <tho...@xteddy.org>
Commit: Thomas Adam <tho...@xteddy.org>

    Fix free versus running notify hooks
    
    Don't free the notify event and then try and run the hooks.  The two 
conditions
    are mutually exclusive.
---
 notify.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/notify.c b/notify.c
index 759ff34..f59960d 100644
--- a/notify.c
+++ b/notify.c
@@ -188,9 +188,14 @@ notify_drain(void)
 
                TAILQ_REMOVE(&notify_queue, ne, entry);
 
+               /*
+                * If we are freeing ne here, then the hook has already run,
+                * otherwise schedule the hook to run.
+                */
                if (ne->do_free)
                        free(ne);
-               notify_run_hook(ne);
+               else
+                       notify_run_hook(ne);
        }
 }
 


-----------------------------------------------------------------------

Summary of changes:
 notify.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
tmux

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to