| |
@@ -1073,7 +1073,7 @@
|
| |
}
|
| |
/* dn is not dup'ed in slapi_sdn_new_dn_byref.
|
| |
* It's set to bdn and put in the dn cache. */
|
| |
- sdn = slapi_sdn_new_normdn_byref(normdn);
|
| |
+ sdn = slapi_sdn_new_normdn_byval((const char *)normdn);
|
| |
bdn = backdn_init(sdn, temp_id, 0);
|
| |
CACHE_ADD(&inst->inst_dncache, bdn, NULL);
|
| |
CACHE_RETURN(&inst->inst_dncache, &bdn);
|
| |
@@ -1085,6 +1085,7 @@
|
| |
e = slapi_str2entry_ext(normdn, NULL, data.dptr,
|
| |
SLAPI_STR2ENTRY_NO_ENTRYDN);
|
| |
slapi_ch_free_string(&rdn);
|
| |
+ slapi_ch_free_string(&normdn);
|
| |
}
|
| |
} else {
|
| |
e = slapi_str2entry(data.data, 0);
|
| |
Bug: The crash reported is caused by calling dblayer_close twice in some
offline exec modes. Investigating the crash revealed another crash
in dbverify and memory leaks, one introduced by the backend
patch, two existing previously
Fix: - call dblayer_close only once
- initialize db env properly in dbverify execmode
- don't set sdn by reference when adding to entrydncache
- free collected instances from commandline in dbupgrade mode
- free bdb env in index mode
Reviewed by: ?