svn commit: r198889 - stable/7/lib/libstand
Christian Brueffer
brueffer at FreeBSD.org
Wed Nov 4 13:40:51 UTC 2009
Author: brueffer
Date: Wed Nov 4 13:40:50 2009
New Revision: 198889
URL: http://svn.freebsd.org/changeset/base/198889
Log:
MFC: r198542
Initialize f_rabuf in the raw device case. A subsequent close()
later on would try to free it, leading to a crash.
Modified:
stable/7/lib/libstand/open.c
Directory Properties:
stable/7/lib/libstand/ (props changed)
Modified: stable/7/lib/libstand/open.c
==============================================================================
--- stable/7/lib/libstand/open.c Wed Nov 4 13:40:04 2009 (r198888)
+++ stable/7/lib/libstand/open.c Wed Nov 4 13:40:50 2009 (r198889)
@@ -113,6 +113,7 @@ open(const char *fname, int mode)
/* see if we opened a raw device; otherwise, 'file' is the file name. */
if (file == (char *)0 || *file == '\0') {
f->f_flags |= F_RAW;
+ f->f_rabuf = NULL;
return (fd);
}
More information about the svn-src-stable
mailing list