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)
This commit is contained in:
parent
9b1bba98df
commit
a98735b36c
@ -168,8 +168,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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user