From a5218a7626e9d1800f13d6580c708833bc62469f Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sun, 16 Aug 2015 13:47:24 +0200 Subject: [PATCH] Don't unlock lock twice Fixes make check on OpenBSD --- src/utils_vl_lookup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.11.0