From owner-svn-src-all@FreeBSD.ORG Wed Nov 4 13:40:51 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 4F211106566B; Wed, 4 Nov 2009 13:40:51 +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 3D2318FC1E; Wed, 4 Nov 2009 13:40:51 +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 nA4DepeX033254; Wed, 4 Nov 2009 13:40:51 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4Depix033252; Wed, 4 Nov 2009 13:40:51 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200911041340.nA4Depix033252@svn.freebsd.org> From: Christian Brueffer Date: Wed, 4 Nov 2009 13:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198889 - stable/7/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:40:51 -0000 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); }