Bug 525390 - hatari-0.50-247.51: missing call to closedir
Summary: hatari-0.50-247.51: missing call to closedir
Status: RESOLVED UPSTREAM
Alias: None
Product: openSUSE 11.2
Classification: openSUSE
Component: Other (show other bugs)
Version: Factory
Hardware: All openSUSE 11.1
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Wolfgang Engel
QA Contact: E-mail List
URL: http://developer.berlios.de/bugs/?fun...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-27 08:27 UTC by David Binderman
Modified: 2009-10-23 23:40 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2009-07-27 08:27:48 UTC
I just had a look at factory package hatari-0.50-247.51

For source code file hatari-0.50/src/screenSnapShot.c
around line 50 is the source code for the
function ScreenSnapShot_GetNum.

I notice the following line of code

  DIR *workingdir = opendir(szWorkingDir);

but no corresponding call to closedir.
This looks like a resource leak to me.

Suggest add call to closedir.
Comment 1 Richard Biener 2009-10-17 14:54:48 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.