From: Ruben Kerkhof Date: Sun, 16 Aug 2015 11:47:24 +0000 (+0200) Subject: Don't unlock lock twice X-Git-Tag: collectd-5.5.1~52^2~13 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a5218a7626e9d1800f13d6580c708833bc62469f;p=collectd.git Don't unlock lock twice Fixes make check on OpenBSD --- diff --git a/src/utils_vl_lookup.c b/src/utils_vl_lookup.c index 8180d0d9..b15dcf02 100644 --- a/src/utils_vl_lookup.c +++ b/src/utils_vl_lookup.c @@ -304,9 +304,10 @@ static int lu_handle_user_class (lookup_t *obj, /* {{{ */ { /* call lookup_class_callback_t() and insert into the list of user objects. */ user_obj = lu_create_user_obj (obj, ds, vl, user_class); - pthread_mutex_unlock (&user_class->lock); - if (user_obj == NULL) + if (user_obj == NULL) { + pthread_mutex_unlock (&user_class->lock); return (-1); + } } pthread_mutex_unlock (&user_class->lock);