Skip to content

Commit

Permalink
DAOS-13785 gurt: protect d_log_refcount with d_log_lock (#12467) (#12474
Browse files Browse the repository at this point in the history
)

Coverity fix for CID 1443180

Signed-off-by: Kenneth Cain <kenneth.c.cain@intel.com>
  • Loading branch information
kccain authored Jun 23, 2023
1 parent 4f3a3d6 commit ee8ce11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gurt/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,8 @@ d_log_init(void)

void d_log_fini(void)
{
D_ASSERT(d_log_refcount > 0);

D_MUTEX_LOCK(&d_log_lock);
D_ASSERT(d_log_refcount > 0);
d_log_refcount--;
if (d_log_refcount == 0) {
cleanup_dbg_namebit();
Expand Down

0 comments on commit ee8ce11

Please sign in to comment.