]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/qlcnic/qlcnic_ctx.c
qlcnic: fix memory leaks
[net-next-2.6.git] / drivers / net / qlcnic / qlcnic_ctx.c
index 0a6a39914aec7e351c581c1bc348495c14cbb464..c2c1f5cc16c6d992d9d00b3a2ab6b84569335874 100644 (file)
@@ -421,7 +421,8 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter)
 
        if (addr == NULL) {
                dev_err(&pdev->dev, "failed to allocate tx desc ring\n");
-               return -ENOMEM;
+               err = -ENOMEM;
+               goto err_out_free;
        }
 
        tx_ring->desc_head = (struct cmd_desc_type0 *)addr;