diff --git a/src/utils_vl_lookup.c b/src/utils_vl_lookup.c
index 8180d0d9ea60380b3c4705eab4654615ea2c9bf3..f85910e1737e7b5d1c328a6e9e15896be2d60d99 100644 (file)
--- a/src/utils_vl_lookup.c
+++ b/src/utils_vl_lookup.c
/**
* 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"),
#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 { \
{
/* 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);