Coverity #484: Fix an off-by-one in module refcounting.

This commit is contained in:
Adam Jackson 2006-03-15 16:11:34 +00:00
parent 6bb2dc02a7
commit d8221a9b70
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,9 @@
* miext/cw/cw.c:
Coverity #337: Remove useless NULL check.
* hw/xfree86/loader/loader.c:
Coverity #484: Fix an off-by-one in module refcounting.
2006-03-15 Benjamin Herrenschmidt <benh@kernel.crashing.org>
* hw/xfree86/dri/dri.c: (DRIExtensionInit):

View File

@ -1446,7 +1446,7 @@ LoaderUnload(int handle)
loaderRec fakeHead;
loaderPtr tmp = &fakeHead;
if (handle < 0 || handle > MAX_HANDLE)
if (handle < 0 || handle >= MAX_HANDLE)
return -1;
/*