NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/44959: Missing closedir in glob.c



The following reply was made to PR lib/44959; it has been noted by GNATS.

From: henning petersen <henning.petersen%t-online.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/44959: Missing closedir in glob.c
Date: Fri, 13 May 2011 11:42:26 +0200

 This is a multi-part message in MIME format.
 --------------040605030606090405010207
 Content-Type: text/plain; charset=ISO-8859-15
 Content-Transfer-Encoding: 7bit
 
 Am 13.05.2011 10:10, schrieb Martin Husemann:
 > The following reply was made to PR lib/44959; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin%duskware.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc: 
 > Subject: Re: lib/44959: Missing closedir in glob.c
 > Date: Fri, 13 May 2011 10:09:44 +0200
 >
 >  Doesn't it need 
 >  
 >          if (pglob->gl_flags & GLOB_ALTDIRFUNC)
 >                  (*pglob->gl_closedir)(dirp);   
 >          else
 >                  closedir(dirp);   
 >  
 >  
 >  or something?
 >  
 >  Martin
 >  
 >
 Is this OK.
 
 --- lib/libc/gen/glob.c    22 Jan 2011 16:24:44 -0000    1.29
 +++ lib/libc/gen/glob.c    13 May 2011 09:29:29 -0000
 @@ -799,7 +799,8 @@
              errno = 0;
              *pathend++ = SEP;
              *pathend = EOS;
 -            return GLOB_NOSPACE;
 +            error = GLOB_NOSPACE;
 +            break;
          }
  
          /*
 
 
 
 
 --------------040605030606090405010207
 Content-Type: text/plain;
  name="glob.c.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="glob.c.diff"
 
 diff -u -r1.29 glob.c
 --- lib/libc/gen/glob.c        22 Jan 2011 16:24:44 -0000      1.29
 +++ lib/libc/gen/glob.c        13 May 2011 09:29:29 -0000
 @@ -799,7 +799,8 @@
                        errno = 0;
                        *pathend++ = SEP;
                        *pathend = EOS;
 -                      return GLOB_NOSPACE;
 +                      error = GLOB_NOSPACE;
 +                      break;
                }
  
                /*
 
 --------------040605030606090405010207--
 


Home | Main Index | Thread Index | Old Index