diff options
Diffstat (limited to 'source4/lib/ldb/tools/ldbedit.c')
-rw-r--r-- | source4/lib/ldb/tools/ldbedit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c index f2cbeedb64..24df98d728 100644 --- a/source4/lib/ldb/tools/ldbedit.c +++ b/source4/lib/ldb/tools/ldbedit.c @@ -219,7 +219,7 @@ static int do_edit(struct ldb_context *ldb, struct ldb_message **msgs1, int coun fclose(f); - asprintf(&cmd, "%s %s", editor, template); + cmd = talloc_asprintf(ldb, "%s %s", editor, template); if (!cmd) { unlink(template); @@ -229,7 +229,7 @@ static int do_edit(struct ldb_context *ldb, struct ldb_message **msgs1, int coun /* run the editor */ ret = system(cmd); - free(cmd); + talloc_free(cmd); if (ret != 0) { unlink(template); |