diff options
Diffstat (limited to 'source4/param/loadparm.c')
-rw-r--r-- | source4/param/loadparm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 7576b05d83..18c8d47746 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -1485,7 +1485,9 @@ static void copy_service(service * pserviceDest, service * pserviceSource, BOOL pdata = pdata->next; } if (not_added) { - paramo = smb_xmalloc_p(struct param_opt); + paramo = malloc_p(struct param_opt); + if (!paramo) + smb_panic("OOM"); paramo->key = strdup(data->key); paramo->value = strdup(data->value); DLIST_ADD(pserviceDest->param_opt, paramo); @@ -1742,7 +1744,9 @@ static BOOL lp_do_parameter_parametric(int snum, const char *pszParmName, const } } - paramo = smb_xmalloc_p(struct param_opt); + paramo = malloc_p(struct param_opt); + if (!paramo) + smb_panic("OOM"); paramo->key = strdup(name); paramo->value = strdup(pszParmValue); paramo->flags = flags; |