Free cluster if we fail to create the dmamap.

Fixes CID 1829
Found by: Coverity
This commit is contained in:
Kip Macy 2007-04-20 05:16:42 +00:00
parent c5136f2fc8
commit 5f1e4ae331

View File

@ -481,9 +481,7 @@ refill_fl(adapter_t *sc, struct sge_fl *q, int n)
if ((sd->flags & RX_SW_DESC_MAP_CREATED) == 0) {
if ((err = bus_dmamap_create(q->entry_tag, 0, &sd->map))) {
log(LOG_WARNING, "bus_dmamap_create failed %d\n", err);
/*
* XXX free cluster
*/
uma_zfree(q->zone, cl);
goto done;
}
sd->flags |= RX_SW_DESC_MAP_CREATED;