svn commit: r198888 - stable/8/lib/libstand
Christian Brueffer
brueffer at FreeBSD.org
Wed Nov 4 13:40:04 UTC 2009
Author: brueffer
Date: Wed Nov 4 13:40:04 2009
New Revision: 198888
URL: http://svn.freebsd.org/changeset/base/198888
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/8/lib/libstand/open.c
Directory Properties:
stable/8/lib/libstand/ (props changed)
Modified: stable/8/lib/libstand/open.c
==============================================================================
--- stable/8/lib/libstand/open.c Wed Nov 4 13:32:25 2009 (r198887)
+++ stable/8/lib/libstand/open.c Wed Nov 4 13:40:04 2009 (r198888)
@@ -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