aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/ks-engine-ldap.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-01-25 12:51:57 +0000
committerJustus Winter <[email protected]>2017-01-25 12:51:57 +0000
commite175152ef7515921635bf1e00383e812668d13fc (patch)
treebc2d9520a5bc0c3b9cef80bad8e8c677bab5b0be /dirmngr/ks-engine-ldap.c
parenttests: Skip GPGME tests that are not built. (diff)
downloadgnupg-e175152ef7515921635bf1e00383e812668d13fc.tar.gz
gnupg-e175152ef7515921635bf1e00383e812668d13fc.zip
agent: Fix double free.
* agent/cache.c (agent_store_cache_hit): Make sure the update is atomic. -- Previously, the function freed the last key, and duplicated the new key after doing that. There is a chance, however, that calling the allocator surrenders control to a different thread, causing a double free if a different thread also calls this function. To make sure the update is atomic under the non-preemptive thread model, we must make sure not to surrender control to a different thread. Therefore, we avoid calling the allocator during the update. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'dirmngr/ks-engine-ldap.c')
0 files changed, 0 insertions, 0 deletions