Date: Wed, 4 Nov 2009 13:40:51 +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-7@freebsd.org Subject: svn commit: r198889 - stable/7/lib/libstand Message-ID: <200911041340.nA4Depix033252@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brueffer Date: Wed Nov 4 13:40:50 2009 New Revision: 198889 URL: http://svn.freebsd.org/changeset/base/198889 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/7/lib/libstand/open.c Directory Properties: stable/7/lib/libstand/ (props changed) Modified: stable/7/lib/libstand/open.c ============================================================================== --- stable/7/lib/libstand/open.c Wed Nov 4 13:40:04 2009 (r198888) +++ stable/7/lib/libstand/open.c Wed Nov 4 13:40:50 2009 (r198889) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911041340.nA4Depix033252>