void *parm_ptr = NULL; /* where we are going to store the result */
struct parmlist_entry **opt_list;
TALLOC_CTX *mem_ctx;
+ TALLOC_CTX *frame = talloc_stackframe();
parmnum = lpcfg_map_parameter(pszParmName);
if (strchr(pszParmName, ':') == NULL) {
DEBUG(0, ("Ignoring unknown parameter \"%s\"\n",
pszParmName));
+ TALLOC_FREE(frame);
return true;
}
set_param_opt(ServicePtrs[snum], opt_list, pszParmName, pszParmValue, 0);
}
+ TALLOC_FREE(frame);
return true;
}
/* if it's already been set by the command line, then we don't
override here */
if (parm_table[parmnum].flags & FLAG_CMDLINE) {
+ TALLOC_FREE(frame);
return true;
}
DEBUG(0,
("Global parameter %s found in service section!\n",
pszParmName));
+ TALLOC_FREE(frame);
return true;
}
parm_ptr = lp_local_ptr_by_snum(snum, &parm_table[parmnum]);
/* if it is a special case then go ahead */
if (parm_table[parmnum].special) {
bool ok;
- struct loadparm_context *lp_ctx = loadparm_init_s3(talloc_tos(),
+ struct loadparm_context *lp_ctx = loadparm_init_s3(frame,
loadparm_s3_helpers());
lp_ctx->sDefault = &sDefault;
lp_ctx->services = ServicePtrs;
ok = parm_table[parmnum].special(lp_ctx, snum, pszParmValue,
(char **)parm_ptr);
- TALLOC_FREE(lp_ctx);
-
+ TALLOC_FREE(frame);
return ok;
}
i = sscanf(pszParmValue, "%o", (int *)parm_ptr);
if ( i != 1 ) {
DEBUG ( 0, ("Invalid octal number %s\n", pszParmName ));
+ TALLOC_FREE(frame);
return false;
}
break;
}
case P_ENUM:
if (!lp_set_enum_parm(&parm_table[parmnum], pszParmValue, (int*)parm_ptr)) {
+ TALLOC_FREE(frame);
return false;
}
break;
break;
}
+ TALLOC_FREE(frame);
return true;
}