Bug 6565 - [PATCH] lib/util/util_file.c: possible resource leak in file_save() functions
[PATCH] lib/util/util_file.c: possible resource leak in file_save() functions
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: Other
unspecified
All All
: P3 minor
: ---
Assigned To: Andrew Bartlett
Matthias Dieter Wallnöfer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-18 04:33 UTC by Slava Semushin
Modified: 2009-07-20 02:13 UTC (History)
0 users

See Also:


Attachments
Proposal fix (787 bytes, patch)
2009-07-18 04:35 UTC, Slava Semushin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Slava Semushin 2009-07-18 04:33:58 UTC
I found one possible memory leak with cppcheck in lib/util/util_file.c. When read(2) fails file descriptor not closes.

Patch in attach.
Comment 1 Slava Semushin 2009-07-18 04:35:01 UTC
Created attachment 4444 [details]
Proposal fix
Comment 2 Matthias Dieter Wallnöfer 2009-07-20 02:13:22 UTC
Fixed in branch "master".