X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_vl_lookup.c;h=f85910e1737e7b5d1c328a6e9e15896be2d60d99;hb=55ef2778ade050e2924eeb027c98feea103f1585;hp=8180d0d9ea60380b3c4705eab4654615ea2c9bf3;hpb=d1483d2e2a9116c233aeaceba99fa58a7e6bdc87;p=collectd.git diff --git a/src/utils_vl_lookup.c b/src/utils_vl_lookup.c index 8180d0d9..f85910e1 100644 --- a/src/utils_vl_lookup.c +++ b/src/utils_vl_lookup.c @@ -1,6 +1,6 @@ /** * collectd - src/utils_vl_lookup.c - * Copyright (C) 2012 Florian Forster + * Copyright (C) 2012 Florian Forster * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -33,6 +33,10 @@ #include "utils_vl_lookup.h" #include "utils_avltree.h" +#if HAVE_LIBKSTAT +kstat_ctl_t *kc; +#endif /* HAVE_LIBKSTAT */ + #if BUILD_TEST # define sstrncpy strncpy # define plugin_log(s, ...) do { \ @@ -304,9 +308,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);