From bb1487fef5d19a7b1536fc42e25a08f7d4c43e1b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 9 Jun 2010 10:04:44 -0400 Subject: Check the correct variable for NULL after creating timer In several places, we were creating a new timer and assigning it to the tev variable, but then we were checking for NULL from the te variable (which, incidentally, is guaranteed never to be NULL in this situation) https://fedorahosted.org/sssd/ticket/523 --- src/monitor/monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/monitor') diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index e52d79349..bda45dc47 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -1435,7 +1435,7 @@ static void process_config_file(struct tevent_context *ev, rw_ctx->file_ctx = file_ctx; tev = tevent_add_timer(ev, rw_ctx, tv, rewatch_config_file, rw_ctx); - if (te == NULL) { + if (tev == NULL) { DEBUG(0, ("Could not restore inotify watch. Quitting!\n")); close(file_ctx->mt_ctx->inotify_fd); kill(getpid(), SIGTERM); @@ -1488,7 +1488,7 @@ static void rewatch_config_file(struct tevent_context *ev, cb->filename, err, strerror(err))); tev = tevent_add_timer(ev, ev, tv, rewatch_config_file, rw_ctx); - if (te == NULL) { + if (tev == NULL) { DEBUG(0, ("Could not restore inotify watch. Quitting!\n")); close(file_ctx->mt_ctx->inotify_fd); kill(getpid(), SIGTERM); -- cgit