Commit in reactos/lib/msafd/misc on MAIN
dllmain.c+6-11.28 -> 1.29
Don't free AsyncData if we're still using it

reactos/lib/msafd/misc
dllmain.c 1.28 -> 1.29
diff -u -r1.28 -r1.29
--- dllmain.c	21 Dec 2004 18:38:49 -0000	1.28
+++ dllmain.c	26 Dec 2004 14:47:57 -0000	1.29
@@ -1865,6 +1865,7 @@
 VOID SockProcessQueuedAsyncSelect(PVOID Context, PIO_STATUS_BLOCK IoStatusBlock)
 {
 	PASYNC_DATA AsyncData = Context;
+	BOOL FreeContext = TRUE;
 	PSOCKET_INFORMATION Socket;
 
 	/* Get the Socket */	
@@ -1877,12 +1878,16 @@
 			/* Do the actuall select, if needed */
 			if ((Socket->SharedData.AsyncEvents & (~Socket->SharedData.AsyncDisabledEvents))) {
 				SockProcessAsyncSelect(Socket, AsyncData);
+				FreeContext = FALSE;
 			}
 		}
 	}
 	
 	/* Free the Context */
-	HeapFree(GetProcessHeap(), 0, AsyncData);
+	if (FreeContext) {
+		HeapFree(GetProcessHeap(), 0, AsyncData);
+	}
+
 	return;
 }
 
CVSspam 0.2.8