[ros-diffs] [hpoussin] 15004: Don't desallocate non allocated memory

hpoussin at svn.reactos.com hpoussin at svn.reactos.com
Thu May 5 17:39:36 CEST 2005


Don't desallocate non allocated memory
Modified: trunk/reactos/drivers/dd/serial/circularbuffer.c
  _____  

Modified: trunk/reactos/drivers/dd/serial/circularbuffer.c
--- trunk/reactos/drivers/dd/serial/circularbuffer.c	2005-05-05
15:39:27 UTC (rev 15003)
+++ trunk/reactos/drivers/dd/serial/circularbuffer.c	2005-05-05
15:39:36 UTC (rev 15004)
@@ -32,7 +32,8 @@

 {
 	DPRINT("Serial: FreeCircularBuffer(pBuffer %p)\n", pBuffer);
 	ASSERT(pBuffer);
-	ExFreePoolWithTag(pBuffer->Buffer, SERIAL_TAG);
+	if (pBuffer->Buffer != NULL)
+		ExFreePoolWithTag(pBuffer->Buffer, SERIAL_TAG);
 	return STATUS_SUCCESS;
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050505/800eb47e/attachment.html


More information about the Ros-diffs mailing list