summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tools')
-rw-r--r--source4/lib/ldb/tools/cmdline.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index cde357a088..fb0292b7d9 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -124,13 +124,14 @@ struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const
case 'o':
options.options = talloc_realloc(ret, options.options,
- const char *, num_options+2);
+ const char *, num_options+3);
if (options.options == NULL) {
ldb_oom(ldb);
goto failed;
}
- options.options[num_options++] = poptGetOptArg(pc);
+ options.options[num_options] = poptGetOptArg(pc);
options.options[num_options+1] = NULL;
+ num_options++;
break;
default: