svn commit: r280581 - stable/10/sys/dev/sfxge

Andrew Rybchenko arybchik at FreeBSD.org
Wed Mar 25 13:03:37 UTC 2015


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


More information about the svn-src-all mailing list