mail[Wesnoth-commits] r25137 - /trunk/src/server/server.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by dave on March 26, 2008 - 07:37:
Author: dave
Date: Wed Mar 26 07:37:18 2008
New Revision: 25137

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25137&view=rev
Log:
fix memory leak in server

Modified:
    trunk/src/server/server.cpp

Modified: trunk/src/server/server.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/server.cpp?rev=25137&r1=25136&r2=25137&view=diff
==============================================================================
--- trunk/src/server/server.cpp (original)
+++ trunk/src/server/server.cpp Wed Mar 26 07:37:18 2008
@@ -519,6 +519,7 @@
                                memcpy(buf_ptr, &buf[0], buf.size());
                                simple_wml::string_span 
compressed_buf(buf_ptr, buf.size());
                                simple_wml::document data(compressed_buf);
+                               data.take_ownership_of_buffer(buf_ptr);
                                std::vector<char>().swap(buf);
 
                                const clock_t after_parsing = 
get_cpu_time(sample);




Related Messages


Powered by MHonArc, Updated Wed Mar 26 12:03:10 2008