NetBSD-Bugs archive

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

lib/44959: Missing closedir in glob.c



>Number:         44959
>Category:       lib
>Synopsis:       Missing closedir in glob.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 13 07:40:00 +0000 2011
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Returning error without closedir.
>How-To-Repeat:

>Fix:
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 04:42:40 -0000
@@ -799,6 +799,7 @@
                        errno = 0;
                        *pathend++ = SEP;
                        *pathend = EOS;
+                       closedir(dirp);
                        return GLOB_NOSPACE;
                }
 



Home | Main Index | Thread Index | Old Index