From edebc88629bea1bcfc64705c196ac7f8aa658d31 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 10 Mar 2016 16:47:16 +0100 Subject: Manage JavaInfo instances via new/delete Change-Id: I10a113718e525b646c51aa8a19f9f2b75a36714a (cherry picked from commit 81dd7115e8da9a365a2d26e225f6ec4d2d8ccb5f) --- jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'jvmfwk/plugins') 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 & info) { - JavaInfo* pInfo = static_cast(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); -- cgit