summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbdel.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tools/ldbdel.c')
-rw-r--r--source4/lib/ldb/tools/ldbdel.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source4/lib/ldb/tools/ldbdel.c b/source4/lib/ldb/tools/ldbdel.c
index dc1c734284..29d3b39730 100644
--- a/source4/lib/ldb/tools/ldbdel.c
+++ b/source4/lib/ldb/tools/ldbdel.c
@@ -34,6 +34,7 @@
#include "includes.h"
#include "ldb/include/ldb.h"
+#include "ldb/include/ldb_private.h"
static int ldb_delete_recursive(struct ldb_context *ldb, const char *dn)
{
@@ -95,18 +96,7 @@ static void usage(void)
break;
case 'o':
- ldbopts++;
- if (options == NULL) {
- options = (const char **)malloc(sizeof(char *) * (ldbopts + 1));
- } else {
- options = (const char **)realloc(options, sizeof(char *) * (ldbopts + 1));
- if (options == NULL) {
- fprintf(stderr, "Out of memory!\n");
- exit(-1);
- }
- }
- options[ldbopts - 1] = optarg;
- options[ldbopts] = NULL;
+ options = ldb_options_parse(options, &ldbopts, optarg);
break;
case 'h':