diff --git a/drivers/filters/mountmgr/point.c b/drivers/filters/mountmgr/point.c index 198e0a5324c..373ade76aa9 100644 --- a/drivers/filters/mountmgr/point.c +++ b/drivers/filters/mountmgr/point.c @@ -344,6 +344,11 @@ QueryPointsFromMemory(IN PDEVICE_EXTENSION DeviceExtension, { Irp->IoStatus.Information = sizeof(MOUNTMGR_MOUNT_POINTS); + if (SymbolicName) + { + FreePool(DeviceName.Buffer); + } + return STATUS_BUFFER_OVERFLOW; } @@ -419,6 +424,11 @@ QueryPointsFromMemory(IN PDEVICE_EXTENSION DeviceExtension, } } + if (SymbolicName) + { + FreePool(DeviceName.Buffer); + } + return STATUS_SUCCESS; }