summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-12 11:22:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-12 13:09:03 +0100
commitaf05fe65ab9f1340ccd4038c14fc91d8595207a7 (patch)
tree28b6aee5b4f611bf0c53ed7ef6b3cc7c362948af /idlc
parentd908422f5763ed8ea79af81336ca564f46435baf (diff)
CID#440614 use after free
a bit of guesswork here I admit Change-Id: I774da6f585e4b81a25660b7823d6bb150630f44f
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/fehelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/idlc/source/fehelper.cxx b/idlc/source/fehelper.cxx
index fdfd8388d657..02df3a824d71 100644
--- a/idlc/source/fehelper.cxx
+++ b/idlc/source/fehelper.cxx
@@ -50,7 +50,6 @@ sal_Bool FeDeclarator::checkType(AstDeclaration const * type)
AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
{
- AstArray* pArray;
AstType* pType;
if ( pDecl == 0 )
@@ -68,7 +67,7 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
if (m_pComplexPart->getNodeType() == NT_array)
{
- pArray = (AstArray*)m_pComplexPart;
+ AstArray* pArray = (AstArray*)m_pComplexPart;
pArray->setType(pType);
// insert array type in global scope
@@ -80,6 +79,7 @@ AstType const * FeDeclarator::compose(AstDeclaration const * pDecl)
{
delete m_pComplexPart;
m_pComplexPart = pDecl2;
+ return (AstType*)pDecl2;
}
}
return pArray;