diff options
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index bfd5af8b6..637ecaf90 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1026,10 +1026,11 @@ stat_worker (const char *name, struct stat *buf, int nofollow, path_conv *pc) pc, (DWORD) real_path); memset (buf, 0, sizeof (struct stat)); res = fh->fstat (buf, pc); - delete fh; } done: + if (fh) + delete fh; MALLOC_CHECK; syscall_printf ("%d = (%s, %p)", res, name, buf); return res; |