From fb6672a6f61ab57ac8500c55e61f735b42e6cef8 Mon Sep 17 00:00:00 2001 From: Christian Brueffer Date: Wed, 4 Nov 2009 13:40:50 +0000 Subject: MFC: r198542 Initialize f_rabuf in the raw device case. A subsequent close() later on would try to free it, leading to a crash. --- lib/libstand/open.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/libstand/open.c b/lib/libstand/open.c index acbda1c9ed31..49dc6608ff43 100644 --- a/lib/libstand/open.c +++ b/lib/libstand/open.c @@ -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); } -- cgit v1.3