From 8a38fbcacc5e4284038787296ea9ea57516a6004 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Mon, 31 Jan 2011 17:07:16 -0600 Subject: [PATCH] mountmgr: Balance volume references in add_volume(). --- dlls/mountmgr.sys/device.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index e23d741ff66..0550a266f23 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -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 ); -- 2.11.4.GIT