]> xenbits.xensource.com Git - libvirt.git/commit
util: Forbid calling hash APIs from iterator callback
authorJiri Denemark <jdenemar@redhat.com>
Mon, 7 Mar 2011 14:07:01 +0000 (15:07 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 18 Mar 2011 09:54:56 +0000 (10:54 +0100)
commitfba550f65147d36d9c878fc13e9fb5770d250e07
tree753db27f3e23626b52ab7111e0fc7199aa9089f4
parentc3ad755f588a776d35eba9f95693b0242d6522aa
util: Forbid calling hash APIs from iterator callback

Calling most hash APIs is not safe from inside of an iterator callback.
Exceptions are APIs that do not modify the hash table and removing
current hash entry from virHashFroEach callback.

This patch make all APIs which are not safe fail instead of just relying
on the callback being nice not calling any unsafe APIs.
src/util/hash.c