summaryrefslogtreecommitdiffstats
path: root/ldap/servers
diff options
context:
space:
mode:
Diffstat (limited to 'ldap/servers')
-rw-r--r--ldap/servers/slapd/task.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/ldap/servers/slapd/task.c b/ldap/servers/slapd/task.c
index a7fe7892..9b2e5ed3 100644
--- a/ldap/servers/slapd/task.c
+++ b/ldap/servers/slapd/task.c
@@ -538,7 +538,11 @@ destroy_task(time_t when, void *arg)
{
Slapi_Task *task = (Slapi_Task *)arg;
Slapi_Task *t1;
- Slapi_PBlock *pb = slapi_pblock_new();
+ Slapi_PBlock *pb;
+
+ if (task == NULL) return;
+
+ pb = slapi_pblock_new();
/* Call the custom destructor callback if one was provided,
* then perform the internal task destruction. */
@@ -1737,7 +1741,14 @@ task_upgradedb_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter,
be = (backend *)slapi_get_next_backend (cookie);
}
slapi_ch_free((void **)&cookie);
- if (NULL == be || NULL == be->be_database->plg_upgradedb ||
+ if (NULL == be) {
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "ERROR: no upgradedb is defined.\n", 0, 0, 0);
+ *returncode = LDAP_UNWILLING_TO_PERFORM;
+ rv = SLAPI_DSE_CALLBACK_ERROR;
+ goto out;
+ }
+ if (NULL == be->be_database->plg_upgradedb ||
strcasecmp(database_type, be->be_database->plg_name)) {
LDAPDebug(LDAP_DEBUG_ANY,
"ERROR: no upgradedb is defined in %s.\n",