From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 13:41:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 903251065670; Wed, 4 Nov 2009 13:41:43 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E1938FC1A; Wed, 4 Nov 2009 13:41:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4DfhQ1033322; Wed, 4 Nov 2009 13:41:43 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4DfhNq033320; Wed, 4 Nov 2009 13:41:43 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911041341.nA4DfhNq033320@svn.freebsd.org> From: Christian Brueffer Date: Wed, 4 Nov 2009 13:41:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198890 - stable/6/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2009 13:41:43 -0000 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); }