We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 791 - missing call to fclose
Summary: missing call to fclose
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: file (show other bugs)
Version: 1.2.13
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-11 06:41 UTC by Pavol Rusnak
Modified: 2009-09-12 12:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavol Rusnak 2009-09-11 06:41:58 UTC
We've received the following report from the reporter:

----

I just had a look at factory package SDL-1.2.13-108.11

For source code file SDL-1.2.13/src/file/SDL_rwops.c
around line 460, function SDL_RWFromFile
is the following code

        fp = fopen(file, mode);

but I fail to notice the matching call to fclose.
This looks like a resource leak to me. Suggest add call
to fclose.
Comment 1 Ryan C. Gordon 2009-09-12 12:23:46 UTC
Not a bug: the fclose() is in stdio_close() in that file. It gets called through a function pointer when the RWops is closed.

--ryan.