summaryrefslogtreecommitdiff
path: root/src/modules/m_xmlsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_xmlsocket.cpp')
-rw-r--r--src/modules/m_xmlsocket.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_xmlsocket.cpp b/src/modules/m_xmlsocket.cpp
index 0e29cb993..2973ed187 100644
--- a/src/modules/m_xmlsocket.cpp
+++ b/src/modules/m_xmlsocket.cpp
@@ -170,7 +170,10 @@ class ModuleXMLSocket : public Module
if ((tmpbuffer[n] == '\r') || (tmpbuffer[n] == '\n'))
tmpbuffer[n] = 0;
- user->AddWriteBuf(std::string(tmpbuffer,count));
+ std::string buf(tmpbuffer, count);
+ LineBuffer *l = new LineBuffer(buf);
+ l->SetRefcount(1);
+ user->AddWriteBuf(l);
delete [] tmpbuffer;
return 1;