diff options
Diffstat (limited to 'compat/opendir.c')
-rw-r--r-- | compat/opendir.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compat/opendir.c b/compat/opendir.c index 13eb974..23803ff 100644 --- a/compat/opendir.c +++ b/compat/opendir.c @@ -28,9 +28,8 @@ opendir( if ((fd = open(myname, 0, 0)) == -1) { return NULL; } - dirp = (DIR *) Tcl_Alloc(sizeof(DIR)); + dirp = (DIR *) Tcl_AttemptAlloc(sizeof(DIR)); if (dirp == NULL) { - /* unreachable? */ close(fd); return NULL; } |