Changeset 079b1f4 in rtems


Ignore:
Timestamp:
Nov 28, 2000, 9:49:50 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
ca4c3870
Parents:
99cfdc2d
Message:

2000-11-28 Sergei Organov <osv@…>

  • libc/getcwd.c: Ensure _closedir(dir) is called even on error exit from the routine.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libc/getcwd.c

    r99cfdc2d r079b1f4  
    7575{
    7676  register struct dirent *dp;
    77   register DIR *dir;
     77  register DIR *dir = 0;
    7878  register dev_t dev;
    7979  register ino_t ino;
     
    255255      bcopy (dp->d_name, bpt, strlen (dp->d_name));
    256256      (void) _closedir (dir);
     257      dir = 0;
    257258
    258259      /* Truncate any file name. */
     
    272273
    273274err:
     275  if(dir)
     276    (void) _closedir (dir);
    274277  if (ptsize)
    275278    free (pt);
Note: See TracChangeset for help on using the changeset viewer.