summaryrefslogtreecommitdiff
path: root/tests/diff/diff_helpers.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-03-10 16:52:09 +0100
committerPatrick Steinhardt <ps@pks.im>2016-03-11 14:20:15 +0100
commit836447e586f275a1f0b32860805f69ad6867ec32 (patch)
treecf43ee1c1a5132a81b475279696bdbbb1ef244fa /tests/diff/diff_helpers.h
parente850e98ddbcca9d51f412482e3bf16b2d5c36bc8 (diff)
downloadlibgit2-836447e586f275a1f0b32860805f69ad6867ec32.tar.gz
config_file: handle error when trying to lock strmap
Accessing the current values map is handled through the `refcounder_strmap_take` function, which first acquires a mutex before accessing its values. While this assures everybody is trying to access the values with the mutex only we do not check if the locking actually succeeds. Fix the issue by checking if acquiring the lock succeeds and returning `NULL` if we encounter an error. Adjust callers.
Diffstat (limited to 'tests/diff/diff_helpers.h')
0 files changed, 0 insertions, 0 deletions