*((int *)(ldap_prefs[i].pref)) = atoi(val);
else
/* store string as string */
- *((const char **)(ldap_prefs[i].pref)) = val;
+ *((const char **)(ldap_prefs[i].pref)) = strdup(val);
} else {
/* ok, we have string to int mapping for this pref
eg. "none", "simple", "sasl" map to 0, 128, 129 */