mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 11:08:45 +00:00
wldap32: Fix some potential infinite loops because of an unsigned loop counter.
This commit is contained in:
parent
98934f20d8
commit
4397e99585
2 changed files with 2 additions and 5 deletions
|
@ -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 a new issue