From 1c99568492fe7b05dc117f453b619d118057fc62 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 11 Nov 2011 17:56:04 -0800 Subject: [PATCH] io.sockets.windows: plug receive-from memory leak Should fix #387. --- basis/io/sockets/windows/windows.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/io/sockets/windows/windows.factor b/basis/io/sockets/windows/windows.factor index 15b7521a92..6b0fa1da47 100755 --- a/basis/io/sockets/windows/windows.factor +++ b/basis/io/sockets/windows/windows.factor @@ -213,7 +213,7 @@ TUPLE: WSARecvFrom-args port :: make-receive-buffer ( n buf -- buf' WSABUF ) buf >c-ptr pinned-alien? - [ buf ] [ n malloc [ buf n memcpy ] keep ] if :> buf' + [ buf ] [ n malloc &free [ buf n memcpy ] keep ] if :> buf' buf' WSABUF malloc-struct &free n >>len