r25213: use talloc_strdup_append_buffer() instead of talloc_append_string()
authorStefan Metzmacher <metze@samba.org>
Tue, 18 Sep 2007 13:31:55 +0000 (13:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:06:55 +0000 (15:06 -0500)
metze

source/utils/ntlm_auth.c

index 6055670d77ddf2ebc7a0b61b0f764515e3c80aae..72bd94e630e93feeb836ebf16bd9a78c4e6d7cfe 100644 (file)
@@ -902,8 +902,7 @@ static void manage_squid_request(enum stdio_helper_mode helper_mode,
        static void *normal_private;
        void **private;
 
-       buf = talloc(NULL, char);
-       buf[0] = '\0';
+       buf = talloc_strdup(NULL, "");
 
        if (buf == NULL) {
                DEBUG(0, ("Failed to allocate memory for reading the input "
@@ -926,7 +925,7 @@ static void manage_squid_request(enum stdio_helper_mode helper_mode,
                        exit(0);
                }
 
-               buf = talloc_append_string(buf, buf, tmp);
+               buf = talloc_strdup_append_buffer(buf, tmp);
                buf_size += INITIAL_BUFFER_SIZE;
 
                if (buf_size > MAX_BUFFER_SIZE) {