diff options
author | Patrick Steinhardt <ps@pks.im> | 2016-03-10 16:52:09 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2016-03-11 14:20:15 +0100 |
commit | 836447e586f275a1f0b32860805f69ad6867ec32 (patch) | |
tree | cf43ee1c1a5132a81b475279696bdbbb1ef244fa /tests/diff/diff_helpers.h | |
parent | e850e98ddbcca9d51f412482e3bf16b2d5c36bc8 (diff) | |
download | libgit2-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