diff options
author | kmacy <kmacy@FreeBSD.org> | 2007-04-20 05:16:42 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2007-04-20 05:16:42 +0000 |
commit | 60e4196f372556371005ae28f8567ec556b76333 (patch) | |
tree | 055515e1ec37e6d72f44504320e6d6b088810c8a /sys/dev | |
parent | c47e703a39cf41322bcf56bb6cfeb0b2a04a03f1 (diff) | |
download | FreeBSD-src-60e4196f372556371005ae28f8567ec556b76333.zip FreeBSD-src-60e4196f372556371005ae28f8567ec556b76333.tar.gz |
Free cluster if we fail to create the dmamap.
Fixes CID 1829
Found by: Coverity
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/cxgb/cxgb_sge.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index d95c4ca..db54ec25 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -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; |