[Libreoffice-bugs] [Bug 111892] Memory Leak in sd::TemplateScanner::ScanEntry()

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Aug 29 09:45:35 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=111892

--- Comment #10 from Noel Grandin <noelgrandin at gmail.com> ---
(In reply to Julien Nabet from comment #9)
> But here, since we've got a vector of pointers of TemplateEntry objects (see
> https://opengrok.libreoffice.org/xref/core/sd/source/ui/inc/TemplateScanner.
> hxx#115), shouldn't we add a loop to call delete on each entry of the vector
> during destruction?
> (https://opengrok.libreoffice.org/xref/core/sd/source/ui/dlg/TemplateScanner.
> cxx#128)

Yes, it looks like the TemplateEntry objects are being leaked. 

As near as I can tell, maFolderList is not doing anything useful currently, and
can be removed.

After that, mpTemplateEntries can be converted to
std::vector<std::unique_ptr<T>>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170829/6e2091c2/attachment.html>


More information about the Libreoffice-bugs mailing list