ruby-changes:12783
From: usa <ko1@a...>
Date: Wed, 12 Aug 2009 14:17:17 +0900 (JST)
Subject: [ruby-changes:12783] Ruby:r24510 (trunk): * win32/win32.c (readdir_internal): free old temporary filename.
usa 2009-08-12 14:16:56 +0900 (Wed, 12 Aug 2009) New Revision: 24510 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24510 Log: * win32/win32.c (readdir_internal): free old temporary filename. [ruby-core:24820] Modified files: trunk/ChangeLog trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 24509) +++ ChangeLog (revision 24510) @@ -1,3 +1,8 @@ +Wed Aug 12 14:14:42 2009 NAKAMURA Usaku <usa@r...> + + * win32/win32.c (readdir_internal): free old temporary filename. + [ruby-core:24820] + Wed Aug 12 12:59:51 2009 Nobuyoshi Nakada <nobu@r...> * string.c (rb_str_new_frozen): must not change encoding of frozen Index: win32/win32.c =================================================================== --- win32/win32.c (revision 24509) +++ win32/win32.c (revision 24510) @@ -1765,6 +1765,8 @@ // // first set up the structure to return // + if (dirp->dirstr.d_name) + free(dirp->dirstr.d_name); conv(dirp->curr, &dirp->dirstr, enc); // @@ -3585,9 +3587,9 @@ size = len; if (!p) { errno = ENOMEM; - return NULL; + return NULL; + } } - } if (!GetCurrentDirectory(size, p)) { errno = map_errno(GetLastError()); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/