diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-11 17:50:49 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-11 17:50:49 +0000 |
commit | 7014b9f58bd62a73011b3945608a90a146caa84f (patch) | |
tree | 6cb733b6e868d914adf8198fa3df43d520eae786 /remoting | |
parent | e476fcea0ba09004afc6b3db472999d36f417ee5 (diff) | |
download | chromium_src-7014b9f58bd62a73011b3945608a90a146caa84f.zip chromium_src-7014b9f58bd62a73011b3945608a90a146caa84f.tar.gz chromium_src-7014b9f58bd62a73011b3945608a90a146caa84f.tar.bz2 |
Fix a weeny leak in the Host plugin.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7617001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/plugin/host_script_object.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc index 460458d..2ba2c46 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"; } } |