summaryrefslogtreecommitdiff
path: root/test/testextract.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/testextract.cc')
-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)