Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: remoting/host/plugin/host_script_object.cc

Issue 7617001: Fix a weeny leak in the Host plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/plugin/host_script_object.cc
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc
index 460458dccc1089567b9370b021c6b679baab5d32..2ba2c468dda1327ce00b3802c8d244df4d71afd5 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -562,9 +562,10 @@ void HostNPScriptObject::LogDebugInfo(const std::string& message) {
}
if (log_debug_info_func_) {
- NPVariant* arg = new NPVariant();
- STRINGZ_TO_NPVARIANT(message.c_str(), *arg);
- bool is_good = InvokeAndIgnoreResult(log_debug_info_func_, arg, 1);
+ NPVariant log_message;
+ STRINGZ_TO_NPVARIANT(message.c_str(), log_message);
+ bool is_good = InvokeAndIgnoreResult(log_debug_info_func_,
+ &log_message, 1);
LOG_IF(ERROR, !is_good) << "LogDebugInfo failed";
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698