Remove invalid free on non-allocated pointer.

The byte_lookup member is a fixed-size 2D array and should not be freed in the
destructor.

Fixes #1018.
This commit is contained in:
Matthias Vallentin 2013-06-06 13:04:47 -07:00
parent 203df4fa6b
commit fde081c30f

View file

@ -66,7 +66,6 @@ template<class T, int N> class H3 {
T byte_lookup[N][H3_BYTE_RANGE]; T byte_lookup[N][H3_BYTE_RANGE];
public: public:
H3(); H3();
~H3() { free(byte_lookup); }
T operator()(const void* data, size_t size, size_t offset = 0) const T operator()(const void* data, size_t size, size_t offset = 0) const
{ {
const unsigned char *p = static_cast<const unsigned char*>(data); const unsigned char *p = static_cast<const unsigned char*>(data);