Skip to content

Commit

Permalink
Fix the double mutex_unlock call
Browse files Browse the repository at this point in the history
  • Loading branch information
ufo-dd committed Oct 25, 2015
1 parent f98a7f1 commit 016cb72
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/rrd_parsetime.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,12 @@ char *rrd_parsetime(
/* yes this code is non re-entrant ... so lets make sure we do not run
in twice */
mutex_lock(&parsetime_mutex);

char *result = rrd_parsetime_nomt(tspec, ptv);

/* ok done ... drop the mutex lock */
mutex_unlock(&parsetime_mutex);

return result;
}

Expand Down Expand Up @@ -1005,11 +1009,9 @@ static char *rrd_parsetime_nomt(
panic(e("the specified time is incorrect (out of range?)"));
}
EnsureMemFree();
/* ok done ... drop the mutex lock */
mutex_unlock(&parsetime_mutex);

return TIME_OK;
} /* rrd_parsetime */
} /* rrd_parsetime_nomt */


int rrd_proc_start_end(
Expand Down

0 comments on commit 016cb72

Please sign in to comment.