FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 10-25-2011, 12:09 PM
"Fabio M. Di Nitto"
 
Default config: fix return checks in ldap loader

Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 fb25af4... 49c30b7... M config/plugins/ldap/configldap.c
config/plugins/ldap/configldap.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/config/plugins/ldap/configldap.c b/config/plugins/ldap/configldap.c
index fb25af4..49c30b7 100644
--- a/config/plugins/ldap/configldap.c
+++ b/config/plugins/ldap/configldap.c
@@ -216,6 +216,8 @@ static int read_config_for(LDAP *ld, struct objdb_iface_ver0 *objdb, hdb_handle_
struct berval **val_ber;

val_ber = ldap_get_values_len(ld, e, attr);
+ if (!val_ber)
+ goto ldap_next;
i=0;
while (val_ber[i]) {
/*
@@ -244,9 +246,10 @@ static int read_config_for(LDAP *ld, struct objdb_iface_ver0 *objdb, hdb_handle_
}
i++;
}
+ ldap_value_free_len(val_ber);
+ldap_next:
ldap_memfree(attr);
attr = ldap_next_attribute(ld, e, attr_ber);
- ldap_value_free_len(val_ber);
}
ldap_memfree(attr);
ber_free(attr_ber, 0);
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 12:06 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org