summaryrefslogtreecommitdiff
path: root/src/w32notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32notify.c')
-rw-r--r--src/w32notify.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/w32notify.c b/src/w32notify.c
index 9f8a62a1daa..c93e8796fe2 100644
--- a/src/w32notify.c
+++ b/src/w32notify.c
@@ -350,6 +350,7 @@ start_watching (const char *file, HANDLE hdir, BOOL subdirs, DWORD flags)
xfree (dirwatch->io_info);
xfree (dirwatch->watchee);
xfree (dirwatch);
+ return NULL;
}
return dirwatch;
}
@@ -412,10 +413,7 @@ add_watch (const char *parent_dir, const char *file, BOOL subdirs, DWORD flags)
return NULL;
if ((dirwatch = start_watching (file, hdir, subdirs, flags)) == NULL)
- {
- CloseHandle (hdir);
- dirwatch->dir = NULL;
- }
+ CloseHandle (hdir);
return dirwatch;
}