svn commit: r279176 - head/sys/dev/sfxge

Andrew Rybchenko arybchik at FreeBSD.org
Sun Feb 22 18:51:00 UTC 2015


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);
 	}
 


More information about the svn-src-all mailing list