wininet: Fix memory leak in HTTP_DeleteCustomHeader. Free the memory associated with the field and value of the custom header otherwise it will be leaked. Found by Valgrind.
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 79e3511..10fa8a5 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c
@@ -4141,6 +4141,9 @@ return FALSE; lpwhr->nCustHeaders--; + HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[index].lpszField); + HeapFree(GetProcessHeap(), 0, lpwhr->pCustHeaders[index].lpszValue); + memmove( &lpwhr->pCustHeaders[index], &lpwhr->pCustHeaders[index+1], (lpwhr->nCustHeaders - index)* sizeof(HTTPHEADERW) ); memset( &lpwhr->pCustHeaders[lpwhr->nCustHeaders], 0, sizeof(HTTPHEADERW) );