]> www.infradead.org Git - users/willy/xarray.git/commit
ida: Free allocated bitmap in error path
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 2 Apr 2020 18:26:13 +0000 (14:26 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 22 Jul 2020 13:56:08 +0000 (09:56 -0400)
commitbb2fdff0f21d6eed13af6148e27e32c120b92c92
treebc291b536e4a8173245bb897f9359943087e1333
parent6d938f25c3e87381e5295f9d6b954705af17b124
ida: Free allocated bitmap in error path

If a bitmap needs to be allocated, and then by the time the thread
is scheduled to be run again all the indices which would satisfy the
allocation have been allocated then we would leak the allocation.  Almost
impossible to hit in practice, but a trivial fix.  Found by Coverity.

Fixes: f32f004cddf8 ("ida: Convert to XArray")
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
lib/idr.c
tools/testing/radix-tree/idr-test.c