[CDRIVER-2451] Coverity analysis defect 102188: LOCK Created: 04/Jan/18  Updated: 28/Oct/23  Resolved: 12/Jan/18

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.10.0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Xiangyu Yao (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible

 Description   

LOCK

Defect 102188 (STATIC_C)
Checker LOCK (subcategory double_unlock)
File: /src/mongoc/mongoc-topology.c
Function _mongoc_topology_run_background
/src/mongoc/mongoc-topology.c, line: 1053
"pthread_mutex_unlock" unlocks "topology->mutex".

             mongoc_mutex_unlock (&topology->mutex);

/src/mongoc/mongoc-topology.c, line: 1128
"pthread_mutex_unlock" unlocks "topology->mutex" while it is unlocked.

       mongoc_mutex_unlock (&topology->mutex);



 Comments   
Comment by Githook User [ 12/Jan/18 ]

Author:

{'email': 'xiangyu.yao24@gmail.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}

Message: CDRIVER-2451 fix double unlock
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0b7e8d8eb1297045a28c050514c7dde9c99d84e9

Generated at Wed Feb 07 21:15:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.