From 3931001e9b16bf8729bbf264ffb4ee72ffcb6fb9 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Tue, 3 Jun 2014 17:29:03 -0300 Subject: [PATCH] fix getpost memory leak. fixes miguelfreitas/twister-html#161 --- libtorrent/src/torrent.cpp | 1 + src/clientversion.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libtorrent/src/torrent.cpp b/libtorrent/src/torrent.cpp index 42af4ade..7e5e7569 100644 --- a/libtorrent/src/torrent.cpp +++ b/libtorrent/src/torrent.cpp @@ -954,6 +954,7 @@ namespace libtorrent printf("piece read error (database corrupt?) - setting we_dont_have(%d)\n", j.piece); we_dont_have(j.piece); } + if (j.buffer) m_ses.free_disk_buffer(j.buffer); (*reqs)--; if (!(*reqs)) cond->notify_all(); diff --git a/src/clientversion.h b/src/clientversion.h index d2292c0d..82c3efe4 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -8,7 +8,7 @@ // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 9 -#define CLIENT_VERSION_REVISION 20 +#define CLIENT_VERSION_REVISION 21 #define CLIENT_VERSION_BUILD 0 // Set to true for release, false for prerelease or test build