mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
wldap32: Fix some potential infinite loops because of an unsigned loop counter.
This commit is contained in:
parent
98934f20d8
commit
4397e99585
@ -109,8 +109,7 @@ static char **split_hostnames( const char *hostnames )
|
||||
return res;
|
||||
|
||||
oom:
|
||||
for (--i; i >= 0; i--)
|
||||
strfreeU( res[i] );
|
||||
while (i > 0) strfreeU( res[--i] );
|
||||
|
||||
HeapFree( GetProcessHeap(), 0, res );
|
||||
HeapFree( GetProcessHeap(), 0, str );
|
||||
|
@ -190,9 +190,7 @@ static char **bv2str_array( struct berval **bv )
|
||||
str[i] = bv2str( *p );
|
||||
if (!str[i])
|
||||
{
|
||||
for (--i; i >= 0; i--)
|
||||
HeapFree( GetProcessHeap(), 0, str[i] );
|
||||
|
||||
while (i > 0) HeapFree( GetProcessHeap(), 0, str[--i] );
|
||||
HeapFree( GetProcessHeap(), 0, str );
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user