summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2010-09-13 08:32:38 -0700
committerNathan Kinder <nkinder@redhat.com>2010-09-13 08:32:38 -0700
commit85346f4f6d0d6f84d26ac0a86428b24236a27420 (patch)
tree9af25c8debe4797efcf5a82c2717e39da7d12978
parent6f321de49e76483d6cc1c02c5311404572dce970 (diff)
downloadds-85346f4f6d0d6f84d26ac0a86428b24236a27420.tar.gz
ds-85346f4f6d0d6f84d26ac0a86428b24236a27420.tar.xz
ds-85346f4f6d0d6f84d26ac0a86428b24236a27420.zip
Bug 630091 - (cov#15516,15517) Initialize pointers before attempting to free
If we encounter an error early in ldbm_instance_index_config_modify_callback(), we jump to the out label where we try to free origMatchingRules, but it may not be initialized. The same is true for origIndexTypes. We need to initialize these pointers to NULL.
-rw-r--r--ldap/servers/slapd/back-ldbm/ldbm_index_config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
index aec9260e..5575ef27 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_index_config.c
@@ -398,7 +398,8 @@ ldbm_instance_index_config_modify_callback(Slapi_PBlock *pb, Slapi_Entry *e,
LDAPMod **mods;
char *arglist[4] = {0};
char *config_attr;
- char *origIndexTypes, *origMatchingRules;
+ char *origIndexTypes = NULL;
+ char *origMatchingRules = NULL;
char **origIndexTypesArray = NULL;
char **origMatchingRulesArray = NULL;
char **addIndexTypesArray = NULL;