diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index dce3232c0e3a2b51e64a9a7067620bde7afe06c0..0155d5780feec4e26d5e53db4b39fbbc7c6e40d0 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -2575,6 +2575,7 @@ static DWORD handle_redirect( struct request *request, DWORD status )
         }
         free( request->path );
         request->path = path;
+        ret = ERROR_SUCCESS;
 
         send_callback( &request->hdr, WINHTTP_CALLBACK_STATUS_REDIRECT, location, len_loc + 1 );
     }