]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix the double mutex_unlock call 678/head
authorUwe Höhna <ufo_dd@web.de>
Sun, 25 Oct 2015 18:34:33 +0000 (19:34 +0100)
committerUwe Höhna <ufo_dd@web.de>
Sun, 25 Oct 2015 18:34:33 +0000 (19:34 +0100)
src/rrd_parsetime.c

index b9f2c212d63860d94da5029f416dbe4a0744cb27..5b4841f552cc2fe9cc2771ae3261cde690310716 100644 (file)
@@ -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(