diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 18f61f108fc..b42f823208c 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -6280,15 +6280,7 @@ static DWORD HTTP_InsertCustomHeader(http_request_t *request, LPHTTPHEADERW lpHd TRACE("--> %s: %s\n", debugstr_w(lpHdr->lpszField), debugstr_w(lpHdr->lpszValue)); count = request->nCustHeaders + 1; - if (count > 1) - { - lph = realloc(request->custHeaders, sizeof(HTTPHEADERW) * count); - memset(lph + request->nCustHeaders, 0, sizeof(HTTPHEADERW)); - } - else - { - lph = calloc(count, sizeof(HTTPHEADERW)); - } + lph = realloc(request->custHeaders, sizeof(HTTPHEADERW) * count); if (!lph) return ERROR_OUTOFMEMORY;