static WERROR nt_open_registry (REG_HANDLE *h, const char *location, const char *credentials)
{
- REGF *regf = (REGF *)talloc_p(h->mem_ctx, REGF);
+ REGF *regf;
REGF_HDR *regf_hdr;
unsigned int regf_id, hbin_id;
HBIN_HDR *hbin_hdr;
+ regf = (REGF *)talloc_p(h->mem_ctx, REGF);
memset(regf, 0, sizeof(REGF));
regf->owner_sid_str = credentials;
h->backend_data = regf;
static WERROR w95_open_reg (REG_HANDLE *h, const char *location, const char *credentials)
{
- CREG *creg = talloc_p(h->mem_ctx, CREG);
+ CREG *creg;
DWORD creg_id, rgkn_id;
- memset(creg, 0, sizeof(CREG));
- h->backend_data = creg;
DWORD i, nfree = 0;
DWORD offset, end_offset;
+ creg = talloc_p(h->mem_ctx, CREG);
+ memset(creg, 0, sizeof(CREG));
+ h->backend_data = creg;
+
if((creg->fd = open(location, O_RDONLY, 0000)) < 0) {
return WERR_FOOBAR;
}