From 8f2741ba1ad0a300c6c044c363d2278573b1a4ca Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 9 Oct 2011 23:23:45 +1100 Subject: lib/param Use talloc_strdup rather than strdup as strdup is banned in the s3 includes.h --- lib/param/loadparm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 999238e21a..2c47193415 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -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; } -- cgit v1.2.3