mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
lib/param Use talloc_strdup rather than strdup as strdup is banned in the s3 includes.h
This commit is contained in:
parent
1b81af0d56
commit
8f2741ba1a
@ -2785,21 +2785,21 @@ bool lpcfg_set_option(struct loadparm_context *lp_ctx, const char *option)
|
||||
char *p, *s;
|
||||
bool ret;
|
||||
|
||||
s = strdup(option);
|
||||
s = talloc_strdup(NULL, option);
|
||||
if (!s) {
|
||||
return false;
|
||||
}
|
||||
|
||||
p = strchr(s, '=');
|
||||
if (!p) {
|
||||
free(s);
|
||||
talloc_free(s);
|
||||
return false;
|
||||
}
|
||||
|
||||
*p = 0;
|
||||
|
||||
ret = lpcfg_set_cmdline(lp_ctx, s, p+1);
|
||||
free(s);
|
||||
talloc_free(s);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user