]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Revert "ITS#9160 OOM handling in mdb tools", wrong branch.
authorOndřej Kuzník <ondra@mistotebe.net>
Fri, 7 Feb 2020 11:34:20 +0000 (11:34 +0000)
committerOndřej Kuzník <ondra@mistotebe.net>
Fri, 7 Feb 2020 11:34:20 +0000 (11:34 +0000)
This reverts commit be61a967e632fdf7836b6efb4e0fc2776d9d3e52.

libraries/liblmdb/mdb_dump.c
libraries/liblmdb/mdb_stat.c

index 63b08d658d5654365cfb88fbfd4993fc3fea7929..ee7dbe85d8f29ba02e5fedb28740808af21333a2 100644 (file)
@@ -279,10 +279,6 @@ int main(int argc, char *argv[])
                                continue;
                        count++;
                        str = malloc(key.mv_size+1);
-                       if (!str) {
-                               fprintf(stderr, "malloc failed\n");
-                               goto txn_abort;
-                       }
                        memcpy(str, key.mv_data, key.mv_size);
                        str[key.mv_size] = '\0';
                        rc = mdb_open(txn, str, 0, &db2);
index f64475efe6ba4d0b01beaf08899d0eab1cd5c8e2..cb73e11322f68280048805bc1df2614bd3e552e5 100644 (file)
@@ -232,10 +232,6 @@ int main(int argc, char *argv[])
                        if (memchr(key.mv_data, '\0', key.mv_size))
                                continue;
                        str = malloc(key.mv_size+1);
-                       if (!str) {
-                               fprintf(stderr, "malloc failed\n");
-                               goto txn_abort;
-                       }
                        memcpy(str, key.mv_data, key.mv_size);
                        str[key.mv_size] = '\0';
                        rc = mdb_open(txn, str, 0, &db2);