Fixed a memory leak in an error path.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1507 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2010-02-14 12:11:54 +00:00
parent 40869e57d1
commit 4f7e597345

View File

@@ -673,7 +673,7 @@ static int srpt_alloc_ioctx_ring(struct srpt_device *sdev,
goto out;
err:
while (--i > 0) {
while (--i >= 0) {
srpt_free_ioctx(sdev, ioctx_ring[i]);
ioctx_ring[i] = NULL;
}