[SETUPAPI]
[reactos.git] / reactos / dll / win32 / setupapi / query.c
index fa9e2a7..58c3d5b 100644 (file)
@@ -356,7 +356,10 @@ static LPWSTR get_source_id( HINF hinf, PINFCONTEXT context, PCWSTR filename )
     }
 
     if (!SetupDiGetActualSectionToInstallW(hinf, source_disks_names, Section, MAX_PATH, NULL, NULL))
+    {
+        HeapFree( GetProcessHeap(), 0, source_id );
         return NULL;
+    }
 
     if (!SetupFindFirstLineW( hinf, Section, source_id, context ) &&
         !SetupFindFirstLineW( hinf, source_disks_names, source_id, context ))