From 4f7e5973450dd4231f5410c5c350dd4dcf1bddde Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 14 Feb 2010 12:11:54 +0000 Subject: [PATCH] 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 --- srpt/src/ib_srpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 4ee4c7763..b72ea2c0e 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -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; }