mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 00:33:57 +00:00
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:
parent
867b1d3431
commit
a79d48f537
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198542
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue