From c0a5256ea46beb2dfbeb56fab1933224fde7b3d1 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 6 Mar 2008 10:52:55 +0000 Subject: [PATCH] - Don't free buffers if they were not allocated. svn path=/trunk/; revision=32580 --- reactos/ntoskrnl/io/iomgr/drvrlist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/iomgr/drvrlist.c b/reactos/ntoskrnl/io/iomgr/drvrlist.c index c0670603e7d..dfdc2a3efe5 100644 --- a/reactos/ntoskrnl/io/iomgr/drvrlist.c +++ b/reactos/ntoskrnl/io/iomgr/drvrlist.c @@ -372,8 +372,10 @@ IoDestroyDriverList(VOID) { ExFreePool(CurrentService->ServiceName.Buffer); ExFreePool(CurrentService->RegistryPath.Buffer); - ExFreePool(CurrentService->ServiceGroup.Buffer); - ExFreePool(CurrentService->ImagePath.Buffer); + if (CurrentService->ServiceGroup.Buffer) + ExFreePool(CurrentService->ServiceGroup.Buffer); + if (CurrentService->ImagePath.Buffer) + ExFreePool(CurrentService->ImagePath.Buffer); RemoveEntryList(&CurrentService->ServiceListEntry); ExFreePool(CurrentService); }