Date: Fri, 16 Dec 2005 02:50:53 +0000 (UTC) From: David Xu <davidxu@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/stdio fread.c local.h vfscanf.c Message-ID: <200512160250.jBG2orZE026056@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
davidxu 2005-12-16 02:50:53 UTC FreeBSD src repository Modified files: lib/libc/stdio fread.c local.h vfscanf.c Log: With current pthread implementations, a mutex initialization will allocate a memory block. sscanf calls __svfscanf which in turn calls fread, fread triggers mutex initialization but the mutex is not destroyed in sscanf, this leads to memory leak. To avoid the memory leak and performance issue, we create a none MT-safe version of fread: __fread, and instead let __svfscanf call __fread. PR: threads/90392 Patch submitted by: dhartmei MFC after: 7 days Revision Changes Path 1.13 +16 -7 src/lib/libc/stdio/fread.c 1.28 +2 -1 src/lib/libc/stdio/local.h 1.39 +1 -1 src/lib/libc/stdio/vfscanf.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512160250.jBG2orZE026056>