Bug 6445 - [PATCH] testsuite/nsswitch/get{gr,pw}ent_r.c: wrong condition used to check fopen() return value
Summary: [PATCH] testsuite/nsswitch/get{gr,pw}ent_r.c: wrong condition used to check f...
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P3 trivial (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Andrew Bartlett
Depends on:
Reported: 2009-06-06 10:03 UTC by Slava Semushin
Modified: 2009-06-06 15:46 UTC (History)
1 user (show)

See Also:

Proposal fix (1.52 KB, patch)
2009-06-06 10:03 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-06-06 10:03:10 UTC
cppcheck complains about memory leak in these files, but looks like its a wrong condition to check fopen() return value. This means: code for throwing situation when fopen() fails never be executed.

Patch in attach.

Thanks in advance.
Comment 1 Slava Semushin 2009-06-06 10:03:42 UTC
Created attachment 4249 [details]
Proposal fix
Comment 2 Volker Lendecke 2009-06-06 15:46:08 UTC
Pushed, thanks.