Fix fd leak noticed by Barry Haddow

This commit is contained in:
Kenneth Heafield 2014-07-22 11:43:20 +08:00
parent 4f670afe48
commit 62b476cd45

View File

@ -374,7 +374,6 @@ ReadBase *ReadFactory(int fd, uint64_t &raw_amount, const void *already_data, co
header.resize(original + got); header.resize(original + got);
} }
if (header.empty()) { if (header.empty()) {
hold.release();
return new Complete(); return new Complete();
} }
switch (DetectMagic(&header[0], header.size())) { switch (DetectMagic(&header[0], header.size())) {