summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorschmirl <schmirl>2007-05-07 11:43:23 +0000
committerschmirl <schmirl>2007-05-07 11:43:23 +0000
commit7fdf0c6832f8e57ee23133e0cb81ff91730d3bcb (patch)
tree0d7e8ab03648a4a10ed38d40e3bf32784b145f31 /server
parent8378d5a17cc5ec14b2c1d0fa8804e014298d2e41 (diff)
downloadvdr-plugin-streamdev-7fdf0c6832f8e57ee23133e0cb81ff91730d3bcb.tar.gz
vdr-plugin-streamdev-7fdf0c6832f8e57ee23133e0cb81ff91730d3bcb.tar.bz2
Fixed memory leak in buffer overflow situation (thanks to rofafor)
Diffstat (limited to 'server')
-rw-r--r--server/connection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/connection.c b/server/connection.c
index dff1945..c5c076a 100644
--- a/server/connection.c
+++ b/server/connection.c
@@ -1,5 +1,5 @@
/*
- * $Id: connection.c,v 1.8 2007/01/15 12:00:19 schmirl Exp $
+ * $Id: connection.c,v 1.9 2007/05/07 11:43:23 schmirl Exp $
*/
#include "server/connection.h"
@@ -104,6 +104,7 @@ bool cServerConnection::Respond(const char *Message, bool Last, ...)
if (m_WriteBytes + length + 2 > sizeof(m_WriteBuffer)) {
esyslog("ERROR: streamdev: output buffer overflow (%s) for %s:%d",
m_Protocol, RemoteIp().c_str(), RemotePort());
+ free(buffer);
return false;
}
Dprintf("OUT: |%s|\n", buffer);