projects
/
profile
/
ivi
/
pixman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc11545
)
Fix uninitialized cache when pthreads are used
author
Søren Sandmann Pedersen
<ssp@redhat.com>
Wed, 7 Apr 2010 05:39:14 +0000
(
01:39
-0400)
committer
Søren Sandmann Pedersen
<ssp@redhat.com>
Wed, 14 Apr 2010 02:41:47 +0000
(22:41 -0400)
The thread local cache is allocated with malloc(), but we rely on it
being initialized to zero, so allocate it with calloc() instead.
pixman/pixman-compiler.h
patch
|
blob
|
history
diff --git
a/pixman/pixman-compiler.h
b/pixman/pixman-compiler.h
index
a4e3f88
..
cdac0d8
100644
(file)
--- a/
pixman/pixman-compiler.h
+++ b/
pixman/pixman-compiler.h
@@
-101,7
+101,7
@@
static type * \
tls_ ## name ## _alloc (key) \
{ \
- type *value =
malloc (sizeof (type));
\
+ type *value =
calloc (1, sizeof (type));
\
if (value) \
pthread_setspecific (key, value); \
return value; \