From: Uwe Höhna Date: Sun, 25 Oct 2015 18:34:33 +0000 (+0100) Subject: Fix the double mutex_unlock call X-Git-Tag: v1.6.0~25^2~7^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F678%2Fhead;p=thirdparty%2Frrdtool-1.x.git Fix the double mutex_unlock call --- 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(