Author: cgutman
Date: Sat Aug 18 16:36:05 2012
New Revision: 57097
URL:
http://svn.reactos.org/svn/reactos?rev=57097&view=rev
Log:
[MSAFD]
- Fix a memory leak in the failure path of WSPGetSockName and WSPGetPeerName
- Fix a broken debug print in WSPGetPeerName
Modified:
trunk/reactos/dll/win32/msafd/misc/dllmain.c
Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Sat Aug 18 16:36:05 2012
@@ -1842,6 +1842,8 @@
}
}
+ HeapFree(GlobalHeap, 0, TdiAddress);
+
return MsafdReturnWithErrno ( Status, lpErrno, 0, NULL );
}
@@ -1933,7 +1935,7 @@
SocketAddress->Address[0].Address,
SocketAddress->Address[0].AddressLength);
*NameLength = Socket->SharedData.SizeOfRemoteAddress;
- AFD_DbgPrint (MID_TRACE, ("NameLength %d Address: %s Port %x\n",
+ AFD_DbgPrint (MID_TRACE, ("NameLength %d Address: %x Port %x\n",
*NameLength, ((struct sockaddr_in *)Name)->sin_addr.s_addr,
((struct sockaddr_in *)Name)->sin_port));
HeapFree(GlobalHeap, 0, SocketAddress);
@@ -1946,6 +1948,8 @@
return SOCKET_ERROR;
}
}
+
+ HeapFree(GlobalHeap, 0, SocketAddress);
return MsafdReturnWithErrno ( Status, lpErrno, 0, NULL );
}