[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <45079acba20851290d1f.1159459198@eng-12.pathscale.com>
Date: Thu, 28 Sep 2006 08:59:58 -0700
From: Bryan O'Sullivan <bos@...hscale.com>
To: rdreier@...co.com
Cc: linux-kernel@...r.kernel.org, openib-general@...nib.org
Subject: [PATCH 2 of 28] IB/ipath - fix memory leak if allocation fails
If the second allocation failed, the first structure allocated in this
routine was not freed.
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@...gic.com>
diff -r c46292ccb0f5 -r 45079acba208 drivers/infiniband/hw/ipath/ipath_driver.c
--- a/drivers/infiniband/hw/ipath/ipath_driver.c Thu Sep 28 08:57:12 2006 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c Thu Sep 28 08:57:12 2006 -0700
@@ -1326,6 +1326,9 @@ int ipath_create_rcvhdrq(struct ipath_de
"for port %u rcvhdrqtailaddr failed\n",
pd->port_port);
ret = -ENOMEM;
+ dma_free_coherent(&dd->pcidev->dev, amt,
+ pd->port_rcvhdrq, pd->port_rcvhdrq_phys);
+ pd->port_rcvhdrq = NULL;
goto bail;
}
pd->port_rcvhdrqtailaddr_phys = phys_hdrqtail;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists