Bug 544221

Summary: libmsn-3.9.97-1.1: two missing calls to fclose
Product: [openSUSE] openSUSE 11.2 Reporter: David Binderman <dcb314>
Component: KDE4 ApplicationsAssignee: E-mail List <kde-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P4 - Low    
Version: Factory   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.1   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2009-10-04 21:05:56 UTC
I just had a look at factory package libmsn-3.9.97-1.1
source code file libmsn-4.0-beta8/msn/util.cpp
function libmsn_Siren7_DecodeVoiceClip
local variable input.

1.

I notice the following code

       input = fopen (old_voice.c_str(), "rb");

but I fail to notice any matching call to fclose. This looks like a
resource leak to me. Suggest add a call to fclose near the end of the
function to plug the leak.

2.

Same package, same source code file, function libmsn_Siren7_EncodeVoiceClip,
local variable input, same problem.
Comment 1 Richard Biener 2009-10-17 14:56:08 UTC
David, in case the issues are not introduced by a patch local to openSUSE please report the issues upstream.

Packagers, please do not add openSUSE-local patches to fix this kind of errors but forward the bugs upstream
and close the bugs as RESOLVED UPSTREAM.

Note that it is perfectly fine to have "resource leaks" at the end of a program as the kernel will clean
up for you.  Manually freeing them only increases binary size and runtime.
Comment 2 Lubos Lunak 2009-10-20 13:53:15 UTC
.

*** This bug has been marked as a duplicate of bug 442933 ***