You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2013/04/12 19:48:35 UTC
svn commit: r1467379 -
/incubator/mesos/trunk/third_party/libprocess/third_party/stout/include/stout/result.hpp
Author: bmahler
Date: Fri Apr 12 17:48:35 2013
New Revision: 1467379
URL: http://svn.apache.org/r1467379
Log:
Fixed a memory leak in stout/result.hpp.
The old object needs to be deleted in the assignment operator
overload function.
From: Jie Yu <yu...@gmail.com>
Review: https://reviews.apache.org/r/9512
Modified:
incubator/mesos/trunk/third_party/libprocess/third_party/stout/include/stout/result.hpp
Modified: incubator/mesos/trunk/third_party/libprocess/third_party/stout/include/stout/result.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/third_party/stout/include/stout/result.hpp?rev=1467379&r1=1467378&r2=1467379&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/third_party/stout/include/stout/result.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/third_party/stout/include/stout/result.hpp Fri Apr 12 17:48:35 2013
@@ -48,6 +48,7 @@ public:
Result<T>& operator = (const Result<T>& that)
{
if (this != &that) {
+ delete t;
state = that.state;
if (that.t != NULL) {
t = new T(*that.t);