From owner-svn-src-stable@FreeBSD.ORG Wed Mar 25 13:03:37 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CF38B8D; Wed, 25 Mar 2015 13:03:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DDAE2A; Wed, 25 Mar 2015 13:03:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD3bWj064199; Wed, 25 Mar 2015 13:03:37 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD3b18064198; Wed, 25 Mar 2015 13:03:37 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251303.t2PD3b18064198@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r280581 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:03:37 -0000 Author: arybchik Date: Wed Mar 25 13:03:36 2015 New Revision: 280581 URL: https://svnweb.freebsd.org/changeset/base/280581 Log: MFC: 279176 sfxge: pass correct address to free allocated memory in the case of load error It is one more place missed in the previous fix. Most likely is was just memory leak on the error handling path since typically efsys_mem_t is filled in by zeros on allocation. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:02:33 2015 (r280580) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:03:36 2015 (r280581) @@ -164,8 +164,8 @@ sfxge_dma_alloc(struct sfxge_softc *sc, * wrong. */ if (esmp->esm_addr == 0) { - bus_dmamem_free(esmp->esm_tag, esmp->esm_base, esmp->esm_map); - bus_dma_tag_destroy(esmp->esm_tag); + bus_dmamem_free(esmp->esm_tag, vaddr, esmp->esm_map); + bus_dma_tag_destroy(esmp->esm_tag); return (ENOMEM); }