Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Feb 2015 18:51:00 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279176 - head/sys/dev/sfxge
Message-ID:  <201502221851.t1MIp02v096395@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Sun Feb 22 18:50:59 2015
New Revision: 279176
URL: https://svnweb.freebsd.org/changeset/base/279176

Log:
  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:
  head/sys/dev/sfxge/sfxge_dma.c

Modified: head/sys/dev/sfxge/sfxge_dma.c
==============================================================================
--- head/sys/dev/sfxge/sfxge_dma.c	Sun Feb 22 18:48:54 2015	(r279175)
+++ head/sys/dev/sfxge/sfxge_dma.c	Sun Feb 22 18:50:59 2015	(r279176)
@@ -168,8 +168,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);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502221851.t1MIp02v096395>