diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-14 15:51:35 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-05-14 15:51:35 +0000 |
| commit | 148b1baf38c6bde846d8940fe67f9239cb2b7f19 (patch) | |
| tree | 9f06daffd18154d89120cec69b722405dc927f3f /src/SingleFileAllocationIterator.cc | |
| parent | 46636201c1806f6b37364e31d12582145be1b13f (diff) | |
2008-05-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Use free() to deallocate memory for _buffer if
HAVE_POSIX_MEMALIGN is
defined.
* src/SingleFileAllocationIterator.cc
(~SingleFileAllocationIterator)
Diffstat (limited to 'src/SingleFileAllocationIterator.cc')
| -rw-r--r-- | src/SingleFileAllocationIterator.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/SingleFileAllocationIterator.cc b/src/SingleFileAllocationIterator.cc index b7f87689..c8bf8480 100644 --- a/src/SingleFileAllocationIterator.cc +++ b/src/SingleFileAllocationIterator.cc @@ -37,6 +37,7 @@ #include "Util.h" #include "a2io.h" #include <cstring> +#include <cstdlib> namespace aria2 { @@ -52,7 +53,11 @@ SingleFileAllocationIterator::SingleFileAllocationIterator(BinaryStream* stream, SingleFileAllocationIterator::~SingleFileAllocationIterator() { +#ifdef HAVE_POSIX_MEMALIGN + free(_buffer); +#else delete [] _buffer; +#endif // HAVE_POSIX_MEMALIGN } void SingleFileAllocationIterator::init() |
