Author: toad
Date: 2008-11-26 15:29:29 +0000 (Wed, 26 Nov 2008)
New Revision: 23878
Modified:
trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
Log:
Fix bucket leak.
Modified: trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
2008-11-26 14:47:23 UTC (rev 23877)
+++ trunk/freenet/src/freenet/client/async/SingleFileFetcher.java
2008-11-26 15:29:29 UTC (rev 23878)
@@ -147,26 +147,32 @@
} else {
if(!ctx.followRedirects) {
onFailure(new
FetchException(FetchException.INVALID_METADATA, "Told me not to follow
redirects (splitfile block??)"), sched);
+ data.free();
return;
}
if(parent.isCancelled()) {
onFailure(new
FetchException(FetchException.CANCELLED), sched);
+ data.free();
return;
}
if(data.size() > ctx.maxMetadataSize) {
onFailure(new
FetchException(FetchException.TOO_BIG_METADATA), sched);
+ data.free();
return;
}
// Parse metadata
try {
metadata = Metadata.construct(data);
wrapHandleMetadata(false);
+ data.free();
} catch (MetadataParseException e) {
onFailure(new
FetchException(FetchException.INVALID_METADATA, e), sched);
+ data.free();
return;
} catch (IOException e) {
// Bucket error?
onFailure(new
FetchException(FetchException.BUCKET_ERROR, e), sched);
+ data.free();
return;
}
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs