summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-04-16 01:10:09 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-04-16 01:10:09 +0200
commit6070a3461841d4398d731fcb33792d55779111f1 (patch)
tree2b7217a5d542202040e8abdcf2eb5d52a32efd90 /test
parent949e033cb7c741b9eed459c0e93a89a92acb168d (diff)
fix a bunch of cppcheck warnings/errors based on a patch by
Niels Thykier, thanks! (Closes: #622805)
Diffstat (limited to 'test')
-rw-r--r--test/testextract.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/testextract.cc b/test/testextract.cc
index 1c738aab9..b790df618 100644
--- a/test/testextract.cc
+++ b/test/testextract.cc
@@ -71,9 +71,12 @@ bool Go(int argc,char *argv[])
Itm.Type = pkgDirStream::Item::Directory;
int Fd;
- if (Extract.DoItem(Itm,Fd) == false)
+ if (Extract.DoItem(Itm,Fd) == false) {
+ fclose(F);
return false;
- }
+ }
+ }
+ fclose(F);
}
else
if (Deb.ExtractArchive(Extract) == false)