From 2ba119f3958cdf61fc8774121c530f922dd9daeb Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 8 Jun 2015 19:56:48 +0530 Subject: [PATCH] fix memory leak --- brightray/browser/net_log.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/brightray/browser/net_log.cc b/brightray/browser/net_log.cc index 7861a96ecf..6959ffbbe6 100644 --- a/brightray/browser/net_log.cc +++ b/brightray/browser/net_log.cc @@ -51,7 +51,8 @@ NetLog::NetLog(net::URLRequestContext* context) << "for net logging"; } else { std::string json; - base::JSONWriter::Write(GetConstants(), &json); + scoped_ptr constants(GetConstants()); + base::JSONWriter::Write(constants.get(), &json); fprintf(log_file_.get(), "{\"constants\": %s, \n", json.c_str()); fprintf(log_file_.get(), "\"events\": [\n");