Skip to content

Commit

Permalink
Merge pull request #297 from achim-k/patch-1 into toolchain-2.9.1
Browse files Browse the repository at this point in the history
Fix memory leak in property decomposition.
  • Loading branch information
francisco-miguel-almeida authored and meyerj committed Jun 3, 2019
2 parents 9a9f4e7 + 2b15565 commit f860911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rtt/types/PropertyDecomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ bool typeDecomposition( base::DataSourceBase::shared_ptr dsb, PropertyBag& targe
base::DataSourceBase::shared_ptr converted = clone->getTypeInfo()->decomposeType(clone);
if ( converted && converted != clone ) {
// converted contains another type
targetbag.add( converted->getTypeInfo()->buildProperty(*it, "", converted) );
targetbag.ownProperty( converted->getTypeInfo()->buildProperty(*it, "", converted) );
} else {
// use the original
targetbag.add( newpb );
targetbag.ownProperty( newpb );
}
} else {
assert( recurse_bag->rvalue().size() >= 1 );
Expand Down

0 comments on commit f860911

Please sign in to comment.