Apache OpenOffice (AOO) Bugzilla – Issue 103749
cpputools/source/regcomplazy/regcomplazy.cxx: resource leak
Last modified: 2010-03-01 07:28:56 UTC
I just had my first look at the source code of Open Office. For source code file cpputools/source/regcomplazy/regcomplazy.cxx, around line 115 is the following source code FILE* fDescr = fopen(argv[ ++nPos ], "r"); I cannot find a matching call to fclose, so this looks like a memory leak. Suggest code rework.
Well, the file gets closed on exit anyway (on every sane OS, at least), but from the view of style it's better to have explicit fclose...
Created attachment 63709 [details] add fclose
reassigning to better owner
Hi Juergen, please add the missing "fclose".
accepted
jsc: We should integrate this patch asap. Setting target to 3.2...
it's already on my list for the next 3.2 cws. It's not very important because the file is closed on exit and the tool is used during the build process only. But of course it's bad style and will be fixed.
patch integrated on cws sb113
.
close