lib/param Use talloc_strdup rather than strdup as strdup is banned in the s3 includes.h
authorAndrew Bartlett <abartlet@samba.org>
Sun, 9 Oct 2011 12:23:45 +0000 (23:23 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 11 Oct 2011 02:41:35 +0000 (13:41 +1100)
lib/param/loadparm.c

index 999238e21ad08e2f1a93d59ffa4825629ce1a90e..2c47193415d0e20eab5335e1cf6ffdeedc443095 100644 (file)
@@ -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;
 }