Initialize f_rabuf in the raw device case. A subsequent close()

later on would try to free it, leading to a crash.

PR:		93998
Submitted by:	neel
MFC after:	1 week
This commit is contained in:
Christian Brueffer 2009-10-28 14:13:45 +00:00
parent 867b1d3431
commit a79d48f537
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198542

View file

@ -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);
}