From owner-svn-src-head@FreeBSD.ORG Sun Oct 12 21:42:22 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01C81106568C; Sun, 12 Oct 2008 21:42:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E4C4E8FC0C; Sun, 12 Oct 2008 21:42:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9CLgLG3056259; Sun, 12 Oct 2008 21:42:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9CLgLaj056258; Sun, 12 Oct 2008 21:42:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200810122142.m9CLgLaj056258@svn.freebsd.org> From: Alexander Motin Date: Sun, 12 Oct 2008 21:42:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r183810 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 12 Oct 2008 21:42:22 -0000 Author: mav Date: Sun Oct 12 21:42:21 2008 New Revision: 183810 URL: http://svn.freebsd.org/changeset/base/183810 Log: Fix bug in a second call of the channel allocation function. This should fix crash on systems where two audio codecs connected to the same HDA bus. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sun Oct 12 20:06:59 2008 (r183809) +++ head/sys/dev/sound/pci/hda/hdac.c Sun Oct 12 21:42:21 2008 (r183810) @@ -4945,7 +4945,7 @@ hdac_audio_bind_as(struct hdac_devinfo * } } else { sc->chans = (struct hdac_chan *)realloc(sc->chans, - sizeof(struct hdac_chan) * cnt, + sizeof(struct hdac_chan) * (sc->num_chans + cnt), M_HDAC, M_ZERO | M_NOWAIT); if (sc->chans == NULL) { sc->num_chans = 0; @@ -4963,7 +4963,6 @@ hdac_audio_bind_as(struct hdac_devinfo * } /* Assign associations in order of their numbers, */ - free = 0; for (j = 0; j < devinfo->function.audio.ascnt; j++) { if (as[j].enable == 0) continue;