mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
Revert "ITS#9160 OOM handling in mdb tools", wrong branch.
This reverts commit be61a967e6
.
This commit is contained in:
parent
47e0e3fdb5
commit
b1170bc035
libraries/liblmdb
@ -279,10 +279,6 @@ int main(int argc, char *argv[])
|
|||||||
continue;
|
continue;
|
||||||
count++;
|
count++;
|
||||||
str = malloc(key.mv_size+1);
|
str = malloc(key.mv_size+1);
|
||||||
if (!str) {
|
|
||||||
fprintf(stderr, "malloc failed\n");
|
|
||||||
goto txn_abort;
|
|
||||||
}
|
|
||||||
memcpy(str, key.mv_data, key.mv_size);
|
memcpy(str, key.mv_data, key.mv_size);
|
||||||
str[key.mv_size] = '\0';
|
str[key.mv_size] = '\0';
|
||||||
rc = mdb_open(txn, str, 0, &db2);
|
rc = mdb_open(txn, str, 0, &db2);
|
||||||
|
@ -232,10 +232,6 @@ int main(int argc, char *argv[])
|
|||||||
if (memchr(key.mv_data, '\0', key.mv_size))
|
if (memchr(key.mv_data, '\0', key.mv_size))
|
||||||
continue;
|
continue;
|
||||||
str = malloc(key.mv_size+1);
|
str = malloc(key.mv_size+1);
|
||||||
if (!str) {
|
|
||||||
fprintf(stderr, "malloc failed\n");
|
|
||||||
goto txn_abort;
|
|
||||||
}
|
|
||||||
memcpy(str, key.mv_data, key.mv_size);
|
memcpy(str, key.mv_data, key.mv_size);
|
||||||
str[key.mv_size] = '\0';
|
str[key.mv_size] = '\0';
|
||||||
rc = mdb_open(txn, str, 0, &db2);
|
rc = mdb_open(txn, str, 0, &db2);
|
||||||
|
Loading…
Reference in New Issue
Block a user