git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Kernel - Fixes from clang's scan-build tool
[tpg/acess2.git]
/
Kernel
/
drv
/
iocache.c
diff --git
a/Kernel/drv/iocache.c
b/Kernel/drv/iocache.c
index
ba822df
..
774c497
100644
(file)
--- a/
Kernel/drv/iocache.c
+++ b/
Kernel/drv/iocache.c
@@
-190,6
+190,10
@@
int IOCache_Add( tIOCache *Cache, Uint64 Sector, void *Buffer )
oldestPrev = prev;
}
}
+ if( !oldest ) {
+ Log_Error("IOCache", "Cache full, but also empty");
+ return -1;
+ }
// Remove from list, write back and free
oldestPrev->Next = oldest->Next;
if(oldest->LastWrite && Cache->Mode != IOCACHE_VIRTUAL)
UCC
git Repository :: git.ucc.asn.au