}
else {
ServicePtrs = tsp;
- ServicePtrs[iNumServices] =
- (service *) malloc(sizeof(service));
+ ServicePtrs[iNumServices] = malloc_p(service);
}
if (!ServicePtrs[iNumServices]) {
DEBUG(0,("add_a_service: out of memory!\n"));
pdata = pdata->next;
}
if (not_added) {
- paramo = smb_xmalloc(sizeof(*paramo));
+ paramo = smb_xmalloc_p(struct param_opt);
paramo->key = strdup(data->key);
paramo->value = strdup(data->value);
DLIST_ADD(pserviceDest->param_opt, paramo);
}
if (!f) {
- f = (struct file_lists *)malloc(sizeof(file_lists[0]));
+ f = malloc_p(struct file_lists);
if (!f)
return;
f->next = file_lists;
}
}
- paramo = smb_xmalloc(sizeof(*paramo));
+ paramo = smb_xmalloc_p(struct param_opt);
paramo->key = strdup(name);
paramo->value = strdup(pszParmValue);
paramo->flags = flags;