fclose(f);
- asprintf(&cmd, "%s %s", editor, template);
+ cmd = talloc_asprintf(ldb, "%s %s", editor, template);
if (!cmd) {
unlink(template);
/* run the editor */
ret = system(cmd);
- free(cmd);
+ talloc_free(cmd);
if (ret != 0) {
unlink(template);
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)) {
fflush(stdout);
talloc_free(res);
- free(expr);
+ talloc_free(expr);
}
printf("\n");