diff options
author | Grace Kloba <klobag@google.com> | 2009-12-27 14:38:14 -0800 |
---|---|---|
committer | Grace Kloba <klobag@google.com> | 2009-12-27 14:38:14 -0800 |
commit | c782c8d3277f1ee627b7d9b70eab27e956b78c98 (patch) | |
tree | 33b8ba458f3c9527cb007c0a4f438e29cb7d393e /tests/BrowserTestPlugin/jni/main.cpp | |
parent | 4bc95d19c9ccf9cfe4c51b1e697db8cc1d86a579 (diff) | |
download | frameworks_base-c782c8d3277f1ee627b7d9b70eab27e956b78c98.zip frameworks_base-c782c8d3277f1ee627b7d9b70eab27e956b78c98.tar.gz frameworks_base-c782c8d3277f1ee627b7d9b70eab27e956b78c98.tar.bz2 |
free the NPObject in NPP_Destroy.
Diffstat (limited to 'tests/BrowserTestPlugin/jni/main.cpp')
-rw-r--r-- | tests/BrowserTestPlugin/jni/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/BrowserTestPlugin/jni/main.cpp b/tests/BrowserTestPlugin/jni/main.cpp index c896ad5..586d139 100644 --- a/tests/BrowserTestPlugin/jni/main.cpp +++ b/tests/BrowserTestPlugin/jni/main.cpp @@ -168,7 +168,10 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, NPError NPP_Destroy(NPP instance, NPSavedData** save) { PluginObject *obj = (PluginObject*) instance->pdata; - delete obj->subPlugin; + if (obj) { + delete obj->subPlugin; + browser->releaseobject(&obj->header); + } return NPERR_NO_ERROR; } |