summaryrefslogtreecommitdiffstats
path: root/src/indmanager
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2013-11-11 17:17:38 +0100
committerTomas Bzatek <tbzatek@redhat.com>2013-11-11 17:17:38 +0100
commiteff6cb40a89756bb8f62200a99b830639e9b17fc (patch)
treefb5465d04681a599a39bb9153291962c01bc010c /src/indmanager
parentc4d5ed79d58df276311f3f40cf563dd8dda19a79 (diff)
downloadopenlmi-providers-eff6cb40a89756bb8f62200a99b830639e9b17fc.tar.gz
openlmi-providers-eff6cb40a89756bb8f62200a99b830639e9b17fc.tar.xz
openlmi-providers-eff6cb40a89756bb8f62200a99b830639e9b17fc.zip
indmanager: Fix potential errorneous dereference
This ideally shouldn't happen in well writen providers.
Diffstat (limited to 'src/indmanager')
-rw-r--r--src/indmanager/ind_manager.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/indmanager/ind_manager.c b/src/indmanager/ind_manager.c
index 2fae132..46c94eb 100644
--- a/src/indmanager/ind_manager.c
+++ b/src/indmanager/ind_manager.c
@@ -966,12 +966,11 @@ bool _im_add_filter(IMManager *manager, CMPISelectExp *se, IMError *err)
bool im_add_filter(IMManager *manager, CMPISelectExp *filter,
const CMPIContext *ctx, IMError *err)
{
- pthread_mutex_lock(&manager->_t_mutex);
if (!manager) {
*err = IM_ERR_MANAGER;
- pthread_mutex_unlock(&manager->_t_mutex);
return false;
}
+ pthread_mutex_lock(&manager->_t_mutex);
if (!ctx) {
*err = IM_ERR_CONTEXT;
pthread_mutex_unlock(&manager->_t_mutex);