svn commit: samba r17740 - in
branches/SAMBA_4_0/source/lib/ldb/tools: .
tridge at samba.org
tridge at samba.org
Wed Aug 23 05:08:55 GMT 2006
Author: tridge
Date: 2006-08-23 05:08:55 +0000 (Wed, 23 Aug 2006)
New Revision: 17740
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17740
Log:
get rid of dependence on asprintf(), using talloc_asprintf() instead
Modified:
branches/SAMBA_4_0/source/lib/ldb/tools/ldbedit.c
branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ldbedit.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tools/ldbedit.c 2006-08-23 04:55:39 UTC (rev 17739)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/ldbedit.c 2006-08-23 05:08:55 UTC (rev 17740)
@@ -219,7 +219,7 @@
fclose(f);
- asprintf(&cmd, "%s %s", editor, template);
+ cmd = talloc_asprintf(ldb, "%s %s", editor, template);
if (!cmd) {
unlink(template);
@@ -229,7 +229,7 @@
/* run the editor */
ret = system(cmd);
- free(cmd);
+ talloc_free(cmd);
if (ret != 0) {
unlink(template);
Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c 2006-08-23 04:55:39 UTC (rev 17739)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c 2006-08-23 05:08:55 UTC (rev 17740)
@@ -225,7 +225,7 @@
struct ldb_result *res = NULL;
int ret;
- asprintf(&expr, "(uid=TEST%d)", uid);
+ expr = talloc_asprintf(ldb, "(uid=TEST%d)", uid);
ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, expr, NULL, &res);
if (ret != LDB_SUCCESS || (uid < nrecords && res->count != 1)) {
@@ -242,7 +242,7 @@
fflush(stdout);
talloc_free(res);
- free(expr);
+ talloc_free(expr);
}
printf("\n");
More information about the samba-cvs
mailing list