From owner-svn-src-head@FreeBSD.ORG Sun Dec 30 21:10:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D919DB2; Sun, 30 Dec 2012 21:10:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 324D68FC08; Sun, 30 Dec 2012 21:10:49 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBULAnmb081347; Sun, 30 Dec 2012 21:10:49 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBULAnYm081346; Sun, 30 Dec 2012 21:10:49 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212302110.qBULAnYm081346@svn.freebsd.org> From: Robert Watson Date: Sun, 30 Dec 2012 21:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244871 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 21:10:49 -0000 Author: rwatson Date: Sun Dec 30 21:10:48 2012 New Revision: 244871 URL: http://svnweb.freebsd.org/changeset/base/244871 Log: When a partially initialised FDT-based device instance can't attach, perhaps due to an interrupt configuration problem, do not try to free device ivars that have not yet have been allocated. MFC after: 1 week Reviewed by: gonzo Sponsored by: DARPA, AFRL Modified: head/sys/dev/fdt/fdtbus.c Modified: head/sys/dev/fdt/fdtbus.c ============================================================================== --- head/sys/dev/fdt/fdtbus.c Sun Dec 30 21:07:21 2012 (r244870) +++ head/sys/dev/fdt/fdtbus.c Sun Dec 30 21:10:48 2012 (r244871) @@ -257,6 +257,8 @@ newbus_device_destroy(device_t dev) struct fdtbus_devinfo *di; di = device_get_ivars(dev); + if (di == NULL) + return; free(di->di_name, M_OFWPROP); free(di->di_type, M_OFWPROP);