projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
smalloc: fix int truncation issue
[fio.git]
/
smalloc.c
diff --git
a/smalloc.c
b/smalloc.c
index d0b6f1e1f0059fb266aac3334d078f36715fbacd..9f40f65a620afaf6881d01013c34e025192ee773 100644
(file)
--- a/
smalloc.c
+++ b/
smalloc.c
@@
-431,10
+431,13
@@
static void *smalloc_pool(struct pool *pool, unsigned int size)
return ptr;
}
-void *smalloc(
unsigned in
t size)
+void *smalloc(
size_
t size)
{
unsigned int i;
+ if (size != (unsigned int) size)
+ return NULL;
+
global_write_lock();
i = last_pool;