[ACPI]
[reactos.git] / reactos / drivers / bus / acpi / main.c
index afdce0e..b58c097 100644 (file)
@@ -37,8 +37,8 @@ Bus_AddDevice(
     NTSTATUS            status;
     PDEVICE_OBJECT      deviceObject = NULL;
     PFDO_DEVICE_DATA    deviceData = NULL;
     NTSTATUS            status;
     PDEVICE_OBJECT      deviceObject = NULL;
     PFDO_DEVICE_DATA    deviceData = NULL;
-    PWCHAR              deviceName = NULL;
 #ifndef NDEBUG
 #ifndef NDEBUG
+    PWCHAR              deviceName = NULL;
     ULONG               nameLength;
 #endif
 
     ULONG               nameLength;
 #endif
 
@@ -159,9 +159,11 @@ Bus_AddDevice(
     deviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
 
 End:
     deviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
 
 End:
+#ifndef NDEBUG
     if (deviceName){
         ExFreePoolWithTag(deviceName, 'MpcA');
     }
     if (deviceName){
         ExFreePoolWithTag(deviceName, 'MpcA');
     }
+#endif
     if (!NT_SUCCESS(status) && deviceObject){
         if (deviceData && deviceData->NextLowerDriver){
             IoDetachDevice (deviceData->NextLowerDriver);
     if (!NT_SUCCESS(status) && deviceObject){
         if (deviceData && deviceData->NextLowerDriver){
             IoDetachDevice (deviceData->NextLowerDriver);