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

Unified Diff: content/renderer/pepper/plugin_object.cc

Issue 324033002: Fix the leak of the wrapper created by WrapperClass_Allocate(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 6 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: content/renderer/pepper/plugin_object.cc
===================================================================
--- content/renderer/pepper/plugin_object.cc (revision 275839)
+++ content/renderer/pepper/plugin_object.cc (working copy)
@@ -43,10 +43,11 @@
void WrapperClass_Deallocate(NPObject* np_object) {
PluginObject* plugin_object = PluginObject::FromNPObject(np_object);
- if (!plugin_object)
- return;
- plugin_object->ppp_class()->Deallocate(plugin_object->ppp_class_data());
- delete plugin_object;
+ if (plugin_object) {
+ plugin_object->ppp_class()->Deallocate(plugin_object->ppp_class_data());
+ delete plugin_object;
+ }
+ delete np_object;
brettw 2014/06/16 19:36:50 Sorry I don't have in my head how this is supposed
Lei Zhang 2014/06/16 20:37:30 I'm not deleting it when FromNPObject() fails. I'm
}
void WrapperClass_Invalidate(NPObject* object) {}
« 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