From: Date: March 7 2007 4:47pm Subject: bk commit into 5.0 tree (iggy:1.2468) BUG#25222 List-Archive: http://lists.mysql.com/commits/21371 X-Bug: 25222 Message-Id: <20070307154713.C4DA3A901A2@recycle> Below is the list of changes that have just been committed into a local 5.0 repository of iggy. When iggy does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-03-07 10:46:38-05:00, iggy@recycle.(none) +1 -0 Bug#25222 Win32 HANDLE leak in my_sopen() - When attempting to associate a Windows File handle to a C run-time file handle there is an upper bound. Once reached, the newly created handles will cause a memory leak since they are not properly associated with a handle that can later be cleaned up. mysys/my_open.c@stripped, 2007-03-07 10:46:36-05:00, iggy@recycle.(none) +6 -1 Bug#25222 Win32 HANDLE leak in my_sopen() - Check for failure in _open_osfhandle and close allocated HANDLE on failure. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: iggy # Host: recycle.(none) # Root: /src/bug25222/my50-bug25222 --- 1.27/mysys/my_open.c 2006-12-23 14:04:08 -05:00 +++ 1.28/mysys/my_open.c 2007-03-07 10:46:36 -05:00 @@ -345,7 +345,12 @@ return -1; /* return error to caller */ } - fh= _open_osfhandle((intptr_t)osfh, oflag & (_O_APPEND | _O_RDONLY | _O_TEXT)); + if ((fh= _open_osfhandle((intptr_t)osfh, + oflag & (_O_APPEND | _O_RDONLY | _O_TEXT))) == -1) + { + _dosmaperr(GetLastError()); /* map error */ + CloseHandle(osfh); + } return fh; /* return handle */ }