This patch adds a restriction that target service structure
must be a valid TALLOC_CTX memory context.
I have traced all call paths and at the moment this is the case,
pservice parameter layways gets allocated on TALLOC_CTX.
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Initialise a copymap.
***************************************************************************/
+/**
+ * Initializes service copymap
+ * Note: pservice *must* be valid TALLOC_CTX
+ */
void init_copymap(struct loadparm_service *pservice)
{
int i;
TALLOC_FREE(pservice->copymap);
- pservice->copymap = bitmap_talloc(NULL, num_parameters());
+ pservice->copymap = bitmap_talloc(pservice, num_parameters());
if (!pservice->copymap)
DEBUG(0,
("Couldn't allocate copymap!! (size %d)\n",