diff options
author | 2011-12-20 15:06:47 -0700 | |
---|---|---|
committer | 2012-01-19 13:14:10 -0700 | |
commit | 927cfaf467a1eb5d2a0fea3a262ea9b212440c91 (patch) | |
tree | e24ea5900568835822ad1d4a8eae0d48c8e35f5c /m4 | |
parent | Fix rpc generator to anchor matches for method names (diff) | |
download | libvirt-927cfaf467a1eb5d2a0fea3a262ea9b212440c91.tar.gz libvirt-927cfaf467a1eb5d2a0fea3a262ea9b212440c91.tar.bz2 libvirt-927cfaf467a1eb5d2a0fea3a262ea9b212440c91.zip |
threads: check for failure to set thread-local value
We had a memory leak on a very arcane OOM situation (unlikely to ever
hit in practice, but who knows if libvirt.so would ever be linked
into some other program that exhausts all thread-local storage keys?).
I found it by code inspection, while analyzing a valgrind report
generated by Alex Jia.
* src/util/threads.h (virThreadLocalSet): Alter signature.
* src/util/threads-pthread.c (virThreadHelper): Reduce allocation
lifetime.
(virThreadLocalSet): Detect failure.
* src/util/threads-win32.c (virThreadLocalSet): Likewise.
(virCondWait): Fix caller.
* src/util/virterror.c (virLastErrorObject): Likewise.
Diffstat (limited to 'm4')
0 files changed, 0 insertions, 0 deletions