diff options
author | arybchik <arybchik@FreeBSD.org> | 2015-03-25 13:03:36 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2015-03-25 13:03:36 +0000 |
commit | 8d456b11c834c4a7e470152c6b9a89b40cc0cef2 (patch) | |
tree | 622c973d158c0110c6b8f3159f29240891de23dd | |
parent | 24cc1ba6e9081a89c7b6de7700d171528b6a82e6 (diff) | |
download | FreeBSD-src-8d456b11c834c4a7e470152c6b9a89b40cc0cef2.zip FreeBSD-src-8d456b11c834c4a7e470152c6b9a89b40cc0cef2.tar.gz |
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)
-rw-r--r-- | sys/dev/sfxge/sfxge_dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sfxge/sfxge_dma.c b/sys/dev/sfxge/sfxge_dma.c index 6030a89..a8dbc8d 100644 --- a/sys/dev/sfxge/sfxge_dma.c +++ b/sys/dev/sfxge/sfxge_dma.c @@ -164,8 +164,8 @@ sfxge_dma_alloc(struct sfxge_softc *sc, bus_size_t len, efsys_mem_t *esmp) * 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); } |