summaryrefslogtreecommitdiff
path: root/jvmfwk/plugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-03-10 16:47:16 +0100
committerAndras Timar <andras.timar@collabora.com>2016-07-13 21:38:07 +0200
commitedebc88629bea1bcfc64705c196ac7f8aa658d31 (patch)
treedf983a2b3b5b3f77c00600757dd2d12d26e21d18 /jvmfwk/plugins
parent6408f4c3b0b3c17057c82b47a84f3ef03a3c978a (diff)
Manage JavaInfo instances via new/delete
Change-Id: I10a113718e525b646c51aa8a19f9f2b75a36714a (cherry picked from commit 81dd7115e8da9a365a2d26e225f6ec4d2d8ccb5f)
Diffstat (limited to 'jvmfwk/plugins')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 667b2875cd85..ca927e19a276 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -146,9 +146,7 @@ OString getPluginJarPath(
JavaInfo* createJavaInfo(const rtl::Reference<VendorBase> & info)
{
- JavaInfo* pInfo = static_cast<JavaInfo*>(rtl_allocateMemory(sizeof(JavaInfo)));
- if (pInfo == nullptr)
- return nullptr;
+ JavaInfo* pInfo = new JavaInfo;
OUString sVendor = info->getVendor();
pInfo->sVendor = sVendor.pData;
rtl_uString_acquire(sVendor.pData);