Mailinglist Archive: opensuse-bugs (10598 mails)
| < Previous | Next > |
[Bug 543417] New: e2fsprogs-1.41.9-2.2: missing call to fclose
- From: bugzilla_noreply@xxxxxxxxxx
- Date: Thu, 1 Oct 2009 03:11:28 -0600
- Message-id: <bug-543417-21960@xxxxxxxxxxxxxxxxxxxxxxxx/>
http://bugzilla.novell.com/show_bug.cgi?id=543417
Summary: e2fsprogs-1.41.9-2.2: missing call to fclose
Classification: openSUSE
Product: openSUSE 11.2
Version: Factory
Platform: All
OS/Version: openSUSE 11.1
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Basesystem
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: dcb314@xxxxxxxxxxx
QAContact: qa@xxxxxxx
Found By: ---
I just had a look at factory package e2fsprogs-1.41.9-2.2
source code file e2fsprogs-1.41.9/misc/ismounted.c
function check_mntent_file
local variable f
I notice the following code
if ((f = fopen(mtab_file, "r")) == NULL)
return errno;
if ((f = setmntent (mtab_file, "r")) == NULL)
return errno;
I notice that if the first if succeeds, then there is a resource leak.
Suggest add call to fclose between the two ifs.
if ((f = fopen(mtab_file, "r")) == NULL)
return errno;
fclose( f);
if ((f = setmntent (mtab_file, "r")) == NULL)
return errno;
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Summary: e2fsprogs-1.41.9-2.2: missing call to fclose
Classification: openSUSE
Product: openSUSE 11.2
Version: Factory
Platform: All
OS/Version: openSUSE 11.1
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Basesystem
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: dcb314@xxxxxxxxxxx
QAContact: qa@xxxxxxx
Found By: ---
I just had a look at factory package e2fsprogs-1.41.9-2.2
source code file e2fsprogs-1.41.9/misc/ismounted.c
function check_mntent_file
local variable f
I notice the following code
if ((f = fopen(mtab_file, "r")) == NULL)
return errno;
if ((f = setmntent (mtab_file, "r")) == NULL)
return errno;
I notice that if the first if succeeds, then there is a resource leak.
Suggest add call to fclose between the two ifs.
if ((f = fopen(mtab_file, "r")) == NULL)
return errno;
fclose( f);
if ((f = setmntent (mtab_file, "r")) == NULL)
return errno;
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
| < Previous | Next > |