PVS: V773 A memory leak is possible

This commit is contained in:
wmayer
2019-02-17 18:40:06 +01:00
parent f581d5c8cb
commit 3845350c0a
22 changed files with 74 additions and 69 deletions

View File

@@ -516,7 +516,7 @@ void PropertyFileIncluded::RestoreDocFile(Base::Reader &reader)
Property *PropertyFileIncluded::Copy(void) const
{
PropertyFileIncluded *prop = new PropertyFileIncluded();
std::unique_ptr<PropertyFileIncluded> prop(new PropertyFileIncluded());
// remember the base name
prop->_BaseFileName = _BaseFileName;
@@ -556,7 +556,7 @@ Property *PropertyFileIncluded::Copy(void) const
newName.setPermissions(Base::FileInfo::ReadWrite);
}
return prop;
return prop.release();
}
void PropertyFileIncluded::Paste(const Property &from)