mountmgr: Balance volume references in add_volume().

This commit is contained in:
Ken Thomases 2011-01-31 17:07:16 -06:00 committed by Alexandre Julliard
parent af641eb4fd
commit 8a38fbcacc
1 changed files with 5 additions and 1 deletions

View File

@ -666,7 +666,11 @@ NTSTATUS add_volume( const char *udi, const char *device, const char *mount_poin
EnterCriticalSection( &device_section );
LIST_FOR_EACH_ENTRY( volume, &volumes_list, struct volume, entry )
if (volume->udi && !strcmp( udi, volume->udi )) goto found;
if (volume->udi && !strcmp( udi, volume->udi ))
{
grab_volume( volume );
goto found;
}
/* udi not found, search for a non-dynamic volume */
if ((volume = find_matching_volume( udi, device, mount_point, type ))) set_volume_udi( volume, udi );