Date: Wed, 4 Nov 2009 13:41:43 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r198890 - stable/6/lib/libstand Message-ID: <200911041341.nA4DfhNq033320@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brueffer Date: Wed Nov 4 13:41:43 2009 New Revision: 198890 URL: http://svn.freebsd.org/changeset/base/198890 Log: MFC: 198542 Initialize f_rabuf in the raw device case. A subsequent close() later on would try to free it, leading to a crash. Modified: stable/6/lib/libstand/open.c Directory Properties: stable/6/lib/libstand/ (props changed) Modified: stable/6/lib/libstand/open.c ============================================================================== --- stable/6/lib/libstand/open.c Wed Nov 4 13:40:50 2009 (r198889) +++ stable/6/lib/libstand/open.c Wed Nov 4 13:41:43 2009 (r198890) @@ -117,6 +117,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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911041341.nA4DfhNq033320>