diff options
author | Tushar Gohad <tusharsg@gmail.com> | 2014-06-27 09:02:41 -0700 |
---|---|---|
committer | Tushar Gohad <tusharsg@gmail.com> | 2014-06-27 09:02:41 -0700 |
commit | d23fb9fce55fb1c8063be50b71b2a88de655d14c (patch) | |
tree | cc122219174f46571e47bcdfefcf69efa37a239d | |
parent | a5440dac2c02abd588167086045a66a98fb6cd5f (diff) | |
parent | 916e6e12703f32bd5cf4fb4f4e1c8838c340facc (diff) | |
download | pyeclib-d23fb9fce55fb1c8063be50b71b2a88de655d14c.tar.gz |
Merged in issue-52 (pull request #12)
Issue-52: fixed leak in reconstruct path
-rw-r--r-- | src/c/pyeclib_c/pyeclib_c.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/c/pyeclib_c/pyeclib_c.c b/src/c/pyeclib_c/pyeclib_c.c index 4607ae7..6827c09 100644 --- a/src/c/pyeclib_c/pyeclib_c.c +++ b/src/c/pyeclib_c/pyeclib_c.c @@ -289,7 +289,7 @@ void* alloc_aligned_buffer16(int size) * 16-byte boundaries to support * 128-bit operations */ - if (posix_memalign(&buf, 16, size) < 0) { + if (posix_memalign(&buf, 16, size) != 0) { return PyErr_NoMemory(); } else { memset(buf, 0, size); @@ -1788,6 +1788,7 @@ error: reconstructed = NULL; out: + free(erased); /* Free fragment buffers that needed to be reallocated for alignment */ for (i = 0; i < k; i++) { if (realloc_bm & (1 << i)) { |