[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] found resource leak

From: Martin Ettl
Subject: [Bug-tar] found resource leak
Date: Sun, 21 Jun 2009 01:29:32 +0200

Hi all,

i have checked the sources of the tar-1.2.2 library with the static code 
analysis tool cppcheck. It found a little issue:

[tar-1.22/src/tar.c:1212]: (error) Resource leak: fp

Take a loop at file tar.c at line 1212:
  if (count == 0)

The function returns without an fclose of the filepointer. A possible fix may 
be following:

  if (count == 0)
  { fclose(fp);

Best regards

Ettl Martin

GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

reply via email to

[Prev in Thread] Current Thread [Next in Thread]