{
char *fname = NULL;
unsigned char dummy;
+ TALLOC_CTX *frame;
if (db_ctx != NULL) {
return True;
return False;
}
- fname = talloc_asprintf(talloc_tos(), "%s/secrets.tdb",
+ frame = talloc_stackframe();
+ fname = talloc_asprintf(frame, "%s/secrets.tdb",
private_dir);
if (fname == NULL) {
+ TALLOC_FREE(frame);
return False;
}
if (db_ctx == NULL) {
DEBUG(0,("Failed to open %s\n", fname));
+ TALLOC_FREE(frame);
return False;
}
- TALLOC_FREE(fname);
-
/**
* Set a reseed function for the crypto random generator
*
/* Ensure that the reseed is done now, while we are root, etc */
generate_random_buffer(&dummy, sizeof(dummy));
+ TALLOC_FREE(frame);
return True;
}