From 016cb727473c35d8e324545c32712a56c5628c89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20H=C3=B6hna?= Date: Sun, 25 Oct 2015 19:34:33 +0100 Subject: [PATCH] Fix the double mutex_unlock call --- src/rrd_parsetime.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rrd_parsetime.c b/src/rrd_parsetime.c index b9f2c212..5b4841f5 100644 --- a/src/rrd_parsetime.c +++ b/src/rrd_parsetime.c @@ -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; } @@ -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( -- 2.47.2