mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 13:41:27 +00:00
ib_srpt: Make srpt_alloc_ioctx_ring() return NULL instead of a dangling
pointer if allocation fails. Reported by Dan Carpenter <dan.carpenter@oracle.com> on the linux-rdma@vger.kernel.org mailing list. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -823,6 +823,7 @@ err:
|
||||
while (--i >= 0)
|
||||
srpt_free_ioctx(sdev, ring[i], dma_size, dir);
|
||||
kfree(ring);
|
||||
ring = NULL;
|
||||
out:
|
||||
TRACE_EXIT_HRES(ring);
|
||||
return ring;
|
||||
|
||||
Reference in New Issue
Block a user