]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
more or less verbatim as suggested by kolya@mit.edu
authorDerrick Brashear <shadow@dementia.org>
Wed, 28 Aug 2002 04:57:37 +0000 (04:57 +0000)
committerGarry Zacheiss <zacheiss@mit.edu>
Wed, 28 Aug 2002 04:57:37 +0000 (04:57 +0000)
avoid leaking directory fds if we get an error

(cherry picked from commit b5677719dc204a2b8d039594b8c70bfee3914896)

src/vol/namei_ops.c

index e1cb1f63d93387996258300ac89a3276260e3b8d..df6371e6e2a8b1f3699bfe1d5c783d287f08bf4d 100644 (file)
@@ -317,8 +317,8 @@ delTree(char *root, char *tree, int *errp)
         */
        *cp = 0; 
       }
-      if (!errno)
-       closedir(ds);
+      /* if (!errno) -- closedir not implicit if we got an error */
+      closedir(ds);
     } 
     
     /* finally axe the current dir */