You don't have to remove the following instruction when you apply the following diff because patch command will ignore this instruction. How to apply the diff and re-make: cd /path/to/DaqComponents/src patch --backup -p2 < /path/to/this/2009.10.ParameterServer-memleak.patch make -f Makefile.DaqOperator diff -r 8ef8b149e0db src/ParameterServer.h --- a/src/ParameterServer.h Wed Apr 07 14:42:46 2010 +0900 +++ b/src/ParameterServer.h Wed Jun 09 13:22:56 2010 +0900 @@ -186,6 +186,7 @@ namespace DAQMW { buf[0] = size; memcpy(&buf[1], m_msg.c_str(), size); m_newSock.sendAll(buf, length); + delete [] buf; m_newSock.disconnect(); } } catch ( SockException& e ) {