/**
* 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"),
{
/* 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);