From b6dea2fce6546e107f4e46e648a96b1a84e33d7e Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Wed, 20 May 2009 11:53:43 -0600 Subject: [PATCH] Oops, null pointer. --- src/llua.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/llua.c b/src/llua.c index f2707d75..e31c9d20 100644 --- a/src/llua.c +++ b/src/llua.c @@ -231,9 +231,10 @@ void llua_rm_notifies(void) { /* git 'er done */ struct _lua_notify_s *head = lua_notifies; - struct _lua_notify_s *next = head->next; + struct _lua_notify_s *next = 0; if (!lua_notifies) return; inotify_rm_watch(inotify_fd, head->wd); + if (head->next) next = head->next; free(head); while (next) { head = next;