ldap/servers/plugins/schema_reload/schema_reload.c | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 6bf6e7920175f6b51e5aa5e191709746a1eb2764
Author: Mark Reynolds <mareynol(a)redhat.com>
Date: Thu Mar 1 10:15:25 2012 -0500
Schema Reload crash fix
In reference to ticket 302. Forget to allocate the task_data.
diff --git a/ldap/servers/plugins/schema_reload/schema_reload.c
b/ldap/servers/plugins/schema_reload/schema_reload.c
index 338aaf4..82d8e2e 100644
--- a/ldap/servers/plugins/schema_reload/schema_reload.c
+++ b/ldap/servers/plugins/schema_reload/schema_reload.c
@@ -257,6 +257,14 @@ schemareload_add(Slapi_PBlock *pb, Slapi_Entry *e,
goto out;
}
+ mytaskdata = (task_data*)slapi_ch_malloc(sizeof(task_data));
+ if (mytaskdata == NULL)
+ {
+ *returncode = LDAP_OPERATIONS_ERROR;
+ rv = SLAPI_DSE_CALLBACK_ERROR;
+ goto out;
+ }
+
mytaskdata->schemadir = slapi_ch_strdup(schemadir);
mytaskdata->bind_dn = slapi_ch_strdup(bind_dn);
Show replies by date