Mailinglist Archive: opensuse-bugs (6630 mails)

< Previous Next >
[Bug 530320] New: sarg-2.2.5-46.15: 2 * missing call to fclose
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 12 Aug 2009 06:13:03 -0600
  • Message-id: <bug-530320-21960@xxxxxxxxxxxxxxxxxxxxxxxx/>
http://bugzilla.novell.com/show_bug.cgi?id=530320


Summary: sarg-2.2.5-46.15: 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: Other
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: dcb314@xxxxxxxxxxx
QAContact: qa@xxxxxxx
Found By: ---


I just had a look at factory package sarg-2.2.5-46.15

1.

For source code file sarg-2.2.5/email.c
around line 300 is the source code for the
function geramail.

I notice the following line of code

if((fp_top3=fopen(top3,"r"))==NULL) {

but I fail to notice a matching call to fclose
This looks like a resource leak to me. Suggest add call to fclose.

2.

In the same file in the same function, first this line

if((fp_top1=fopen(top1,"w"))==NULL) {

next this line

if((fp_top1=fopen(top1,"a"))==NULL) {

without a call to fclose between them. This is another resource leak.
Suggest add call to fclose.

--
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 >
Follow Ups