diff --git a/stim/envi/agilent_binary.h b/stim/envi/agilent_binary.h index 14aa524..b103e68 100644 --- a/stim/envi/agilent_binary.h +++ b/stim/envi/agilent_binary.h @@ -37,9 +37,10 @@ public: return size() * sizeof(T); } void alloc(){ + if (ptr != NULL) free(ptr); ptr = (T*) malloc(bytes()); } - void alloc(size_t x, size_t y, size_t z){ + void alloc(size_t x, size_t y, size_t z){ R[0] = x; R[1] = y; R[2] = z; -- libgit2 0.21.4