Browse Source

[master] make sure temporary renderer buffer is reset after query processing.

otherwise it could result in duplicate free.  This basically recovers the
same behavior of d5ec40dace9fddaaec9873cfca2d670e8d35650a that was lost
in commit 699068ef1467867fbbb86cfebc20e823c5128100.
JINMEI Tatuya 13 years ago
parent
commit
c0eb91022a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/bin/auth/auth_srv.cc

+ 3 - 1
src/bin/auth/auth_srv.cc

@@ -578,8 +578,9 @@ AuthSrvImpl::processNormalQuery(const IOMessage& io_message, Message& message,
     } else {
         message.toWire(renderer_);
     }
+    renderer_.setBuffer(NULL);
     LOG_DEBUG(auth_logger, DBG_AUTH_MESSAGES, AUTH_SEND_NORMAL_RESPONSE)
-              .arg(renderer_.getLength()).arg(message.toText());
+              .arg(renderer_.getLength()).arg(message);
     return (true);
 }
 
@@ -704,6 +705,7 @@ AuthSrvImpl::processNotify(const IOMessage& io_message, Message& message,
     } else {
         message.toWire(renderer_);
     }
+    renderer_.setBuffer(NULL);
     return (true);
 }