summaryrefslogtreecommitdiffstats
path: root/src/monitor
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-06-09 10:04:44 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-06-10 10:17:22 -0400
commita0c29342ed97d052d1d4e98558a71889645ff012 (patch)
treeb7e30c73e3be952c9365dd676a246fc536b83a5e /src/monitor
parent9a193114a64965459dd085d39e36144bcd5b3063 (diff)
downloadsssd_unused-a0c29342ed97d052d1d4e98558a71889645ff012.tar.gz
sssd_unused-a0c29342ed97d052d1d4e98558a71889645ff012.tar.xz
sssd_unused-a0c29342ed97d052d1d4e98558a71889645ff012.zip
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
Diffstat (limited to 'src/monitor')
-rw-r--r--src/monitor/monitor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index acac12db..91bcb9a1 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);