summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbedit.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-23 05:08:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:34 -0500
commit0a98d909952c658d754c3d33594f58d8d30c21cf (patch)
treeebad8618443e04a5dcec3c2278aea45b08561118 /source4/lib/ldb/tools/ldbedit.c
parent57f587729dd6b39ad7bc41f3d2e2b6d1be606f9a (diff)
downloadsamba-0a98d909952c658d754c3d33594f58d8d30c21cf.tar.gz
samba-0a98d909952c658d754c3d33594f58d8d30c21cf.tar.bz2
samba-0a98d909952c658d754c3d33594f58d8d30c21cf.zip
r17740: get rid of dependence on asprintf(), using talloc_asprintf() instead
(This used to be commit 0e350ea0c1bba278995da5e8de677c5651eb623e)
Diffstat (limited to 'source4/lib/ldb/tools/ldbedit.c')
-rw-r--r--source4/lib/ldb/tools/ldbedit.c4
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);